"docs/git@developer.sourcefind.cn:change/sglang.git" did not exist on "3758d209a08d1325b2bb1b3caff6c0482c93f82b"
Commit b85b9658 authored by Davis King's avatar Davis King
Browse files

Added a missing requirement that the max dictionary size must be greater than 1.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403681
parent 1650d8e9
......@@ -75,10 +75,11 @@ namespace dlib
min_tolerance(min_tolerance_)
{
// make sure requires clause is not broken
DLIB_ASSERT(min_tolerance_ > 0,
DLIB_ASSERT(min_tolerance_ > 0 && max_dictionary_size_ > 1,
"\tlinearly_independent_subset_finder()"
<< "\n\tinvalid argument to constructor"
<< "\n\tmin_tolerance_: " << min_tolerance_
<< "\n\tmax_dictionary_size_: " << max_dictionary_size_
<< "\n\tthis: " << this
);
clear_dictionary();
......
......@@ -60,12 +60,13 @@ namespace dlib
linearly_independent_subset_finder (
const kernel_type& kernel_,
unsigned long max_dictionary_size,
unsigned long max_dictionary_size_,
scalar_type min_tolerance = 0.001
);
/*!
requires
- min_tolerance > 0
- max_dictionary_size > 1
ensures
- #minimum_tolerance() == min_tolerance
- this object is properly initialized
......
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