Commit ba1d50cc authored by Davis King's avatar Davis King

Changed code to avoid warnings from visual studio.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403423
parent 4a2b796b
...@@ -284,8 +284,7 @@ namespace dlib ...@@ -284,8 +284,7 @@ namespace dlib
// The cost of evaluating an element of a matrix multiply is the cost of evaluating elements from // The cost of evaluating an element of a matrix multiply is the cost of evaluating elements from
// RHS and LHS times the number of rows/columns in the RHS/LHS matrix. If we don't know the matrix // RHS and LHS times the number of rows/columns in the RHS/LHS matrix. If we don't know the matrix
// dimensions then just assume it is really large. // dimensions then just assume it is really large.
const static long cost = (lhs_cost+rhs_cost)* const static long cost = ((tmax<LHS::NC,RHS::NR>::value!=0)? ((lhs_cost+rhs_cost)*tmax<LHS::NC,RHS::NR>::value):(10000));
((tmax<LHS::NC,RHS::NR>::value!=0)? (tmax<LHS::NC,RHS::NR>::value):(10000));
}; };
template <typename T, bool is_ref> struct conditional_matrix_temp { typedef typename T::matrix_type type; }; template <typename T, bool is_ref> struct conditional_matrix_temp { typedef typename T::matrix_type type; };
......
...@@ -64,7 +64,7 @@ namespace ...@@ -64,7 +64,7 @@ namespace
double err; double err;
// the samples in the basis should have zero projection error // the samples in the basis should have zero projection error
for (int i = 0; i < samples.size(); ++i) for (unsigned long i = 0; i < samples.size(); ++i)
{ {
ekm.project(samples[i], err); ekm.project(samples[i], err);
DLIB_TEST_MSG(abs(err) < 1e-13, abs(err)); DLIB_TEST_MSG(abs(err) < 1e-13, abs(err));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment