#include <CGAL/Classification/Cluster.h>
Class that represent a cluster of items to be classified as a single atomic object.
A cluster is a set of indices of items inside an input range with random access.
- Template Parameters
-
|
typedef ItemMap::value_type | Item |
|
|
| Cluster (const ItemRange &range, ItemMap item_map) |
| Constructs an empty cluster of items. More...
|
|
|
void | clear () |
| Clears the cluster.
|
|
void | insert (std::size_t idx) |
| Inserts element of index idx in the cluster.
|
|
|
std::size_t | size () const |
| Returns the number of items in the cluster.
|
|
std::size_t | index (std::size_t i) const |
| Returns the index (in the input range) of the i^{th} element of the cluster.
|
|
const Item & | operator[] (std::size_t i) const |
| Returns the i^{th} item of the cluster.
|
|
CGAL::Bbox_3 | bbox () const |
| Returns the bounding box of the cluster.
|
|
|
int | training () const |
| Returns the input classification value used for training.
|
|
int & | training () |
| Returns a reference to the input classification value used for training.
|
|
int | label () const |
| Returns the output classification value.
|
|
int & | label () |
| Returns a reference to the output classification value.
|
|
◆ Cluster()
template<typename ItemRange , typename ItemMap >
Constructs an empty cluster of items.
Items in the clusters will be subsets of range
.
- Parameters
-
range | input range. |
item_map | property map to access the input items. |