\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0.2 - Classification
CGAL::Classification::Label_set Class Reference

#include <CGAL/Classification/Label_set.h>


Set of Label used as input by classification algorithms.

Public Member Functions

 Label_set ()
Label_handle add (const char *name)
 Adds a label. More...
bool remove (Label_handle label)
 Removes a label. More...
std::size_t size () const
 Returns how many labels are defined.
Label_handle operator[] (std::size_t i) const
 Returns the \(i^{th}\) label.
void clear ()
 Removes all labels.

Member Function Documentation

◆ add()

Label_handle CGAL::Classification::Label_set::add ( const char *  name)

Adds a label.

Names are not used for identification: two labels in the same set can have the same name (but not the same handle).
namename of the label.
a handle to the newly added label.

◆ remove()

bool CGAL::Classification::Label_set::remove ( Label_handle  label)

Removes a label.

labelthe handle to the label that must be removed.
true if the label was correctly removed, false if its handle was not found.