Added a missing requirement to sort_basis_vectors()

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403895
This commit is contained in:
Davis King 2010-11-12 23:36:56 +00:00
parent 84bd5a6187
commit bdd4bcbfba
2 changed files with 5 additions and 2 deletions

View File

@ -63,11 +63,13 @@ namespace dlib
)
{
DLIB_ASSERT(is_binary_classification_problem(samples, labels) &&
0 < eps && eps <= 1,
0 < eps && eps <= 1 &&
basis.size() > 0,
"\t void sort_basis_vectors()"
<< "\n\t Invalid arguments were given to this function."
<< "\n\t is_binary_classification_problem(samples, labels): " << is_binary_classification_problem(samples, labels)
<< "\n\t eps: " << eps
<< "\n\t basis.size(): " << basis.size()
<< "\n\t eps: " << eps
);
typedef typename kernel_type::sample_type sample_type;

View File

@ -30,6 +30,7 @@ namespace dlib
requires
- is_binary_classification_problem(samples, labels)
- 0 < eps <= 1
- basis.size() > 0
- kernel_type is a kernel function object as defined in dlib/svm/kernel_abstract.h
It must be capable of operating on the elements of samples and basis.
- vect1_type == a matrix or something convertible to a matrix via vector_to_matrix()