fixed some compiler warnings and errors in visual studio

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402847
This commit is contained in:
Davis King 2009-02-01 20:36:59 +00:00
parent e77ce7d7a2
commit b25d303e6d
5 changed files with 13 additions and 13 deletions

View File

@ -35,6 +35,10 @@
// Disable warnings about conversion from size_t to unsigned long and long.
#pragma warning(disable : 4267)
// Disable warnings about conversion from double to float
#pragma warning(disable : 4244)
#pragma warning(disable : 4305)
#endif
#ifdef __BORLANDC__

View File

@ -27,7 +27,7 @@ namespace dlib
typedef typename matrix_exp_type::mem_manager_type mem_manager_type;
typedef typename matrix_exp_type::layout_type layout_type;
typedef typename matrix_exp_type::matrix_type matrix_type;
typedef matrix<type,0,0,mem_manager_type,layout_type> matrix_type;
typedef matrix<type,NR,1,mem_manager_type,layout_type> column_vector_type;
// You have supplied an invalid type of matrix_exp_type. You have
@ -49,7 +49,7 @@ namespace dlib
) const;
template <typename EXP>
const matrix<type,matrix_exp_type::NR,EXP::NC,mem_manager_type,layout_type> solve (
const typename EXP::matrix_type solve (
const matrix_exp<EXP>& B
) const;
@ -159,11 +159,7 @@ namespace dlib
template <typename matrix_exp_type>
template <typename EXP>
const matrix<typename matrix_exp_type::type,
matrix_exp_type::NR,
EXP::NC,
typename matrix_exp_type::mem_manager_type,
typename matrix_exp_type::layout_type> cholesky_decomposition<matrix_exp_type>::
const typename EXP::matrix_type cholesky_decomposition<matrix_exp_type>::
solve(
const matrix_exp<EXP>& B
) const

View File

@ -478,7 +478,7 @@ namespace dlib
type f = 0.0;
type tst1 = 0.0;
type eps = pow(2.0,-52.0);
const type eps = std::numeric_limits<type>::epsilon();
for (int l = 0; l < n; l++)
{
@ -747,7 +747,7 @@ namespace dlib
int n = nn-1;
int low = 0;
int high = nn-1;
type eps = pow(2.0,-52.0);
const type eps = std::numeric_limits<type>::epsilon();
type exshift = 0.0;
type p=0,q=0,r=0,s=0,z=0,t,w,x,y;

View File

@ -128,7 +128,7 @@ namespace dlib
{
// Most of the time is spent in the following dot product.
const long kmax = std::min(i,j);
const double s = rowm(LU,i, kmax)*colm(LUcolj,0,kmax);
const type s = rowm(LU,i, kmax)*colm(LUcolj,0,kmax);
LU(i,j) = LUcolj(i) -= s;
}
@ -147,7 +147,7 @@ namespace dlib
long k=0;
for (k = 0; k < n; k++)
{
double t = LU(p,k);
type t = LU(p,k);
LU(p,k) = LU(j,k);
LU(j,k) = t;
}

View File

@ -28,8 +28,8 @@ namespace
// ----------------------------------------------------------------------------------------
template <typename matrix_type>
const typename matrix_type::matrix_type symm(const matrix_type& m) { return m*trans(m); }
template <typename mat_type>
const matrix<typename mat_type::type> symm(const mat_type& m) { return m*trans(m); }
// ----------------------------------------------------------------------------------------