max_size.cpp 411 B

12345678910111213141516171819202122
  1. #include "max_size.h"
  2. template <typename T>
  3. IGL_INLINE int igl::max_size(const std::vector<T> & V)
  4. {
  5. int max_size = -1;
  6. for(
  7. typename std::vector<T>::const_iterator iter = V.begin();
  8. iter != V.end();
  9. iter++)
  10. {
  11. int size = (int)iter->size();
  12. max_size = (max_size > size ? max_size : size);
  13. }
  14. return max_size;
  15. }
  16. #ifndef IGL_HEADER_ONLY
  17. // Explicit template specialization
  18. #endif