mirror of https://github.com/davisking/dlib.git
Removed cruft
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403562
This commit is contained in:
parent
2ad9276b3f
commit
c2a8327076
|
@ -188,11 +188,9 @@ namespace dlib
|
|||
|
||||
temp1 = kernel_matrix(kernel, basis, samp);
|
||||
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));
|
||||
// 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue