Remove gcd function from core headers

This commit is contained in:
Andrey Kamaev
2013-03-30 21:47:42 +04:00
parent c886afb502
commit 4ab650d15b
3 changed files with 50 additions and 46 deletions

View File

@@ -1036,18 +1036,7 @@ inline FileNode FileStorage::getFirstTopLevelNode() const
//////////////////////////////////////// Various algorithms ////////////////////////////////////
template<typename _Tp> static inline _Tp gcd(_Tp a, _Tp b)
{
if( a < b )
std::swap(a, b);
while( b > 0 )
{
_Tp r = a % b;
a = b;
b = r;
}
return a;
}
// This function splits the input sequence or set into one or more equivalence classes and
// returns the vector of labels - 0-based class indexes for each element.