Commit 58d685d0 authored by Davis King's avatar Davis King

Fixed a compiler warning and also a runtime bug in sort_basis_vectors().

The bug triggered when all the basis vectors were included in the final
answer.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403937
parent b4542c43
......@@ -87,7 +87,7 @@ namespace dlib
running_covariance<gen_matrix> cov;
// compute the covariance matrix and the means of the two classes.
for (unsigned long i = 0; i < samples.size(); ++i)
for (long i = 0; i < samples.size(); ++i)
{
temp = kernel_matrix(kern, basis, samples(i));
cov.add(temp);
......@@ -112,7 +112,7 @@ namespace dlib
long best_size = delta.size();
long misses = 0;
matrix<long,0,1,mm_type> best_total_perm;
matrix<long,0,1,mm_type> best_total_perm = perm;
// Now we basically find fisher's linear discriminant over and over. Each
// time sorting the features so that the most important ones pile up together.
......
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