Commit 3e9a0d42 authored by Davis King's avatar Davis King

Fixed incorrect requirements in the kcentroid constructor. They were a

little too weak.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403682
parent b85b9658
......@@ -91,7 +91,7 @@ namespace dlib
bias_is_stale(false)
{
// make sure requires clause is not broken
DLIB_ASSERT(tolerance_ >= 0 && max_dictionary_size_ > 0,
DLIB_ASSERT(tolerance_ > 0 && max_dictionary_size_ > 1,
"\tkcentroid::kcentroid()"
<< "\n\t You have to give a positive tolerance"
<< "\n\t this: " << this
......
......@@ -72,8 +72,8 @@ namespace dlib
);
/*!
requires
- tolerance >= 0
- max_dictionary_size_ > 0
- tolerance > 0
- max_dictionary_size_ > 1
ensures
- this object is properly initialized
- #tolerance() == tolerance_
......
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