Fixed maximum features ignored (always set to 400)

This commit is contained in:
Mathieu Labbe
2015-04-29 00:02:10 -04:00
parent 3699fab6e0
commit 711c8e1124
3 changed files with 64 additions and 2 deletions
+49
View File
@@ -308,6 +308,42 @@ inline typename std::list<V>::const_iterator uIteratorAt(const std::list<V> & li
return iter;
}
/**
* Get the iterator at a specified position in a std::set. If the position
* is out of range, the result is the end iterator of the set.
* @param set the set
* @param pos the index position in the set
* @return the iterator at the specified index
*/
template<class V>
inline typename std::set<V>::iterator uIteratorAt(std::set<V> & set, const unsigned int & pos)
{
typename std::set<V>::iterator iter = set.begin();
for(unsigned int i = 0; i<pos && iter != set.end(); ++i )
{
++iter;
}
return iter;
}
/**
* Get the iterator at a specified position in a std::set. If the position
* is out of range, the result is the end iterator of the set.
* @param set the set
* @param pos the index position in the set
* @return the iterator at the specified index
*/
template<class V>
inline typename std::set<V>::const_iterator uIteratorAt(const std::set<V> & set, const unsigned int & pos)
{
typename std::set<V>::const_iterator iter = set.begin();
for(unsigned int i = 0; i<pos && iter != set.end(); ++i )
{
++iter;
}
return iter;
}
/**
* Get the iterator at a specified position in a std::vector. If the position
* is out of range, the result is the end iterator of the vector.
@@ -321,6 +357,19 @@ inline typename std::vector<V>::iterator uIteratorAt(std::vector<V> & v, const u
return v.begin() + pos;
}
/**
* Get the iterator at a specified position in a std::vector. If the position
* is out of range, the result is the end iterator of the vector.
* @param v the vector
* @param pos the index position in the vector
* @return the iterator at the specified index
*/
template<class V>
inline typename std::vector<V>::const_iterator uIteratorAt(const std::vector<V> & v, const unsigned int & pos)
{
return v.begin() + pos;
}
/**
* Get the value at a specified position in a std::list. If the position
* is out of range, the result is undefined.