mirror of https://github.com/CGAL/cgal
fix the return type
This commit is contained in:
parent
e1b2ce7c66
commit
b85d35d23f
|
|
@ -47,13 +47,12 @@ int main(int, char* argv[])
|
|||
|
||||
std::cerr << cc.size() << " faces in the CC of " << fd << std::endl;
|
||||
|
||||
Mesh::Property_map<face_descriptor,int> fccmap;
|
||||
fccmap = sm.add_property_map<face_descriptor,int>("f:CC").first;
|
||||
int num = PMP::connected_components(sm,
|
||||
fccmap,
|
||||
CGAL::parameters::edge_is_constrained_map(Constraint<Mesh>())
|
||||
.face_index_map(get(CGAL::face_index, sm))
|
||||
);
|
||||
Mesh::Property_map<face_descriptor,std::size_t> fccmap;
|
||||
fccmap = sm.add_property_map<face_descriptor,std::size_t>("f:CC").first;
|
||||
std::size_t num = PMP::connected_components(sm,
|
||||
fccmap,
|
||||
CGAL::parameters::edge_is_constrained_map(Constraint<Mesh>())
|
||||
);
|
||||
|
||||
std::cerr << "The graph has " << num << " connected components (face connectivity)" << std::endl;
|
||||
BOOST_FOREACH(face_descriptor f , faces(sm)){
|
||||
|
|
|
|||
|
|
@ -468,12 +468,14 @@ connected_component(typename boost::graph_traits<PolygonMesh>::face_descriptor s
|
|||
* computes for each face the index of the connected components to which it belongs.
|
||||
* Two faces are considered to be in the same connected component if they share an edge that is not constrained.
|
||||
* \tparam PolygonMesh a model of `FaceGraph`
|
||||
* \tparam FaceComponentMap the property map with the face descriptor as key type, and the index of its connected component as value type
|
||||
* \tparam EdgeConstraintMap a property map with the edge descriptor as key type and `bool` as value type.
|
||||
* \tparam FaceComponentMap the property map with the face index as value type, and the index of its connected component
|
||||
* \tparam FaceIndexMap a property map for the face index
|
||||
* \tparam
|
||||
* \returns the number of connected components.
|
||||
*/
|
||||
template <class PolygonMesh, class EdgeConstraintMap, class FaceComponentMap, class FaceIndexMap>
|
||||
typename boost::graph_traits<PolygonMesh>::faces_size_type
|
||||
typename boost::property_traits<FaceComponentMap>::value_type
|
||||
connected_components(PolygonMesh& pmesh,
|
||||
FaceComponentMap& fcm,
|
||||
EdgeConstraintMap ecmap,
|
||||
|
|
@ -489,7 +491,7 @@ connected_components(PolygonMesh& pmesh,
|
|||
|
||||
|
||||
template <class PolygonMesh, class FaceComponentMap, class P, class T, class R>
|
||||
typename boost::graph_traits<PolygonMesh>::faces_size_type
|
||||
typename boost::property_traits<FaceComponentMap>::value_type
|
||||
connected_components(PolygonMesh& pmesh,
|
||||
FaceComponentMap& fcm,
|
||||
const cgal_bgl_named_params<P,T,R>& params)
|
||||
|
|
@ -516,7 +518,7 @@ connected_components(PolygonMesh& pmesh,
|
|||
* \returns the number of connected components.
|
||||
*/
|
||||
template <class PolygonMesh, class FaceComponentMap>
|
||||
typename boost::graph_traits<PolygonMesh>::faces_size_type
|
||||
typename boost::property_traits<FaceComponentMap>::value_type
|
||||
connected_components(PolygonMesh& pmesh,
|
||||
FaceComponentMap& fcm)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue