CGAL 5.1.2 - Classification
Cluster Classification

Data structures specialized to classify clusters.

Classes

class  CGAL::Classification::Cluster< ItemRange, ItemMap >
 Class that represent a cluster of items to be classified as a single atomic object. More...
 
class  CGAL::Classification::Feature::Cluster_mean_of_feature
 Feature that computes the mean values of an itemwise feature over the respective items of clusters. More...
 
class  CGAL::Classification::Feature::Cluster_size
 Feature that returns the size of each cluster. More...
 
class  CGAL::Classification::Feature::Cluster_variance_of_feature
 Feature that computes the variance values of an itemwise feature over the respective items of clusters. More...
 
class  CGAL::Classification::Feature::Cluster_vertical_extent
 Feature that returns the length of the smallest interval on the Z axis that contains all the items of a cluster. More...
 

Functions

template<typename ItemRange , typename ItemMap , typename IndexMap >
std::size_t CGAL::Classification::create_clusters_from_indices (const ItemRange &range, ItemMap item_map, IndexMap index_map, std::vector< Cluster< ItemRange, ItemMap > > &clusters)
 Given a set of cluster indices, segments the input range into Cluster objects. More...
 

Function Documentation

◆ create_clusters_from_indices()

template<typename ItemRange , typename ItemMap , typename IndexMap >
std::size_t CGAL::Classification::create_clusters_from_indices ( const ItemRange &  range,
ItemMap  item_map,
IndexMap  index_map,
std::vector< Cluster< ItemRange, ItemMap > > &  clusters 
)

#include <CGAL/Classification/Cluster.h>

Given a set of cluster indices, segments the input range into Cluster objects.

All items whose index value idx (accessed through index_map) is the same are stored in the same cluster at position idx in the clusters vector.

Template Parameters
ItemRangemodel of ConstRange. Its iterator type is RandomAccessIterator. Its value type depends on the data that is classified (for example, CGAL::Point_3 or CGAL::Triangle_3).
ItemMapmodel of ReadablePropertyMap whose key type is the value type of the iterator of ItemRange and value type is the type of item to classify (for example, CGAL::Point_3).
IndexMapis a model of ReadablePropertyMap with value type int.
Parameters
rangeinput range.
item_mapproperty map to access the input items.
index_mapproperty map that associates the index of an item in the input range to the index of a cluster (-1 if item is not assigned to a cluster).
clusterscontainer where generated Cluster objects are stored.