Bug fix in debug checks - don't check lower triangle of Hessian because only the upper triangle is used

release/4.3a0
Richard Roberts 2011-04-26 19:40:47 +00:00
parent 790599799c
commit 7e901f4fad
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ namespace gtsam {
#ifndef NDEBUG
// Check for non-finite values
for(size_t i=0; i<matrix_.size1(); ++i)
for(size_t j=0; j<matrix_.size2(); ++j)
for(size_t j=i; j<matrix_.size2(); ++j)
if(!isfinite(matrix_(i,j)))
throw invalid_argument("HessianFactor contains non-finite matrix entries.");
#endif