Commit 850d9058 authored by Davis King's avatar Davis King

Removed an unneeded and potentially numerical instability

inducing std::abs call.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402393
parent c0634bb9
...@@ -286,7 +286,7 @@ namespace dlib ...@@ -286,7 +286,7 @@ namespace dlib
// if this new vector isn't approximately linearly dependent on the vectors // if this new vector isn't approximately linearly dependent on the vectors
// in our dictionary. // in our dictionary.
if (std::abs(delta) > my_tolerance) if (delta > my_tolerance)
{ {
if (dictionary.size() >= my_max_dictionary_size) if (dictionary.size() >= my_max_dictionary_size)
{ {
......
...@@ -120,7 +120,7 @@ namespace dlib ...@@ -120,7 +120,7 @@ namespace dlib
// if this new vector isn't approximately linearly dependent on the vectors // if this new vector isn't approximately linearly dependent on the vectors
// in our dictionary. // in our dictionary.
if (std::abs(delta) > my_tolerance) if (delta > my_tolerance)
{ {
if (dictionary.size() >= my_max_dictionary_size) if (dictionary.size() >= my_max_dictionary_size)
{ {
......
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