#ifndef IGL_COMPONENTS_H #define IGL_COMPONENTS_H #include #include #include namespace igl { // Compute connected components of a graph represented by an adjacency matrix // // Inputs: // A n by n adjacency matrix // Outputs: // C n list of component ids // template IGL_INLINE void components( const Eigen::SparseMatrix & A, Eigen::PlainObjectBase & C); // Ditto but for mesh faces as input // // Inputs: // F n by 3 list of triangle indices // Outputs: // C max(F) list of component ids template IGL_INLINE void components( const Eigen::PlainObjectBase & F, Eigen::PlainObjectBase & C); } #ifdef IGL_HEADER_ONLY # include "components.cpp" #endif #endif