machine learning - OpenCV partition() underlying algorithm -
if @ opencv source code partition function, see following comments:
// function splits input sequence or set 1 or more equivalence classes , // returns vector of labels - 0-based class indexes each element. // predicate(a,b) returns true if 2 sequence elements belong same class. // // algorithm described in "introduction algorithms" // cormen, leiserson , rivest, chapter "data structures disjoint sets" template<typename _tp, class _eqpredicate> int partition( const vector<_tp>& _vec, vector<int>& labels, _eqpredicate predicate=_eqpredicate()) { // ... etc. } this gives both source code, , reference algorithm.
so, that's chapter 21 in book.
Comments
Post a Comment