\( \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 4.14 - Classification
CGAL::Classification::Label_set Class Reference

#include <CGAL/Classification/Label_set.h>

Definition

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.

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

◆ remove()

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

Removes a label.

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