plot_vector.h 457 B

123456789101112131415161718192021222324252627
  1. #ifndef IGL_PLOT_VECTOR_H
  2. #define IGL_PLOT_VECTOR_H
  3. namespace igl
  4. {
  5. template <typename T>
  6. inline void plot_vector( vector<T>& v)
  7. {
  8. for (int i=0; i<v.size(); ++i)
  9. cerr << v[i] << " ";
  10. cerr << endl;
  11. }
  12. template <typename T>
  13. inline void plot_vector( vector< vector<T> >& v)
  14. {
  15. for (int i=0; i<v.size(); ++i)
  16. {
  17. for (int j=0; j<v[i].size(); ++j)
  18. cerr << v[i][j] << " ";
  19. cerr << endl;
  20. }
  21. }
  22. }
  23. #endif