writeTGF.h 814 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef IGL_WRITETGF_H
  2. #define IGL_WRITETGF_H
  3. #include "igl_inline.h"
  4. #include <vector>
  5. #include <string>
  6. #ifndef IGL_NO_EIGEN
  7. #include <Eigen/Dense>
  8. #endif
  9. namespace igl
  10. {
  11. // WRITETGF
  12. //
  13. // Write a graph to a .tgf file
  14. //
  15. // Input:
  16. // filename .tgf file name
  17. // V # vertices by 3 list of vertex positions
  18. // E # edges by 2 list of edge indices
  19. //
  20. // Assumes that graph vertices are 3 dimensional
  21. IGL_INLINE bool writeTGF(
  22. const std::string tgf_filename,
  23. const std::vector<std::vector<double> > & C,
  24. const std::vector<std::vector<int> > & E);
  25. #ifndef IGL_NO_EIGEN
  26. IGL_INLINE bool writeTGF(
  27. const std::string tgf_filename,
  28. const Eigen::MatrixXd & C,
  29. const Eigen::MatrixXi & E);
  30. #endif
  31. }
  32. #ifdef IGL_HEADER_ONLY
  33. # include "writeTGF.cpp"
  34. #endif
  35. #endif