Commit 84db6269 authored by Davis King's avatar Davis King

Removed the ASSERT that the B matrix be symmetric since compiler optimizations

can sometimes cause B to be very slightly non-symmetric.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404083
parent 578ba83d
...@@ -32,15 +32,13 @@ namespace dlib ...@@ -32,15 +32,13 @@ namespace dlib
*/ */
// make sure requires clause is not broken // make sure requires clause is not broken
DLIB_ASSERT(B.nr() == B.nc() && is_col_vector(g) && g.size() == B.nr() && equal(B,trans(B)), DLIB_ASSERT(B.nr() == B.nc() && is_col_vector(g) && g.size() == B.nr(),
"\t unsigned long solve_trust_region_subproblem()" "\t unsigned long solve_trust_region_subproblem()"
<< "\n\t invalid arguments were given to this function" << "\n\t invalid arguments were given to this function"
<< "\n\t B.nr(): " << B.nr() << "\n\t B.nr(): " << B.nr()
<< "\n\t B.nc(): " << B.nc() << "\n\t B.nc(): " << B.nc()
<< "\n\t is_col_vector(g): " << is_col_vector(g) << "\n\t is_col_vector(g): " << is_col_vector(g)
<< "\n\t g.size(): " << g.size() << "\n\t g.size(): " << g.size()
<< "\n\t equal(B,trans(B)): " << equal(B,trans(B))
<< "\n\t max(abs(B-trans(B))): " << max(abs(B-trans(B)))
); );
DLIB_ASSERT(radius > 0 && eps > 0 && max_iter > 0, DLIB_ASSERT(radius > 0 && eps > 0 && max_iter > 0,
"\t unsigned long solve_trust_region_subproblem()" "\t unsigned long solve_trust_region_subproblem()"
......
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