min_size.h 474 B

1234567891011121314151617181920212223
  1. #ifndef IGL_MIN_SIZE_H
  2. #define IGL_MIN_SIZE_H
  3. #include "igl_inline.h"
  4. #include <vector>
  5. namespace igl
  6. {
  7. // Determine min size of lists in a vector
  8. // Template:
  9. // T some list type object that implements .size()
  10. // Inputs:
  11. // V vector of list types T
  12. // Returns min .size() found in V, returns -1 if V is empty
  13. template <typename T>
  14. IGL_INLINE int min_size(const std::vector<T> & V);
  15. }
  16. #ifdef IGL_HEADER_ONLY
  17. # include "min_size.cpp"
  18. #endif
  19. #endif