#include "path_to_edges.h" template IGL_INLINE void igl::path_to_edges( const Eigen::MatrixBase & I, Eigen::PlainObjectBase & E, bool make_loop) { // Check that I is 1 dimensional assert(I.size() == I.rows() || I.size() == I.cols()); if(make_loop) { E.conservativeResize(I.size(), 2); for(int i = 0; i < I.size() - 1; i++) { E(i, 0) = I(i); E(i, 1) = I(i + 1); } E(I.size() - 1, 0) = I(I.size() - 1); E(I.size() - 1, 1) = I(0); } else { E.conservativeResize(I.size()-1, 2); for(int i = 0; i < I.size()-1; i++) { E(i, 0) = I(i); E(i, 1) = I(i+1); } } } template IGL_INLINE void igl::path_to_edges( const std::vector & I, Eigen::PlainObjectBase & E, bool make_loop) { igl::path_to_edges(Eigen::Map>(I.data(), I.size()), E, make_loop); } #ifdef IGL_STATIC_LIBRARY template void igl::path_to_edges, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, bool); template void igl::path_to_edges >(std::vector > const&, Eigen::PlainObjectBase >&, bool); #endif