Added a missing requires clause to the kkmeans object.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402367
pull/2/head
Davis King 16 years ago
parent 3946767f6e
commit 828f7bbb87

@ -58,6 +58,15 @@ namespace dlib
unsigned long i
) const
{
// make sure requires clause is not broken
DLIB_ASSERT(i < number_of_centers(),
"\tkcentroid kkmeans::get_kcentroid(i)"
<< "\n\tYou have given an invalid value for i"
<< "\n\ti: " << i
<< "\n\tnumber_of_centers(): " << number_of_centers()
<< "\n\tthis: " << this
);
return *centers[i];
}

@ -65,6 +65,8 @@ namespace dlib
unsigned long i
) const;
/*!
requires
- i < number_of_centers()
ensures
- returns a const reference to the ith kcentroid object contained in
this object. Each kcentroid represents one of the centers found

Loading…
Cancel
Save