Removed cruft

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403562
This commit is contained in:
Davis King 2010-04-02 13:08:25 +00:00
parent 2ad9276b3f
commit c2a8327076
1 changed files with 2 additions and 4 deletions

View File

@ -188,11 +188,9 @@ namespace dlib
temp1 = kernel_matrix(kernel, basis, samp); temp1 = kernel_matrix(kernel, basis, samp);
temp2 = weights*temp1; temp2 = weights*temp1;
// This value should never be negative (it measures squared distance) but I'm putting the abs()
// here just for good measure since rounding error might push it slightly negative.
projection_error = std::abs( kernel(samp,samp) - dot(temp2,temp2)); projection_error = std::abs( kernel(samp,samp) - dot(temp2,temp2));
// Rounding error could make the expression slightly negative which is an impossible result
// since it measures a distance. Just force it to be zero in that case.
if (projection_error < 0)
projection_error = 0;
return temp2; return temp2;
} }