\( \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.12.1 - Classification
CGAL::Classification::Feature_set Class Reference

#include <CGAL/Classification/Feature_set.h>

Definition

Set of features (see Feature_base) used as input by classification algorithms.

This class handles both the instantiation, the addition and the deletion of features.

Public Member Functions

 Feature_set ()
 
template<typename Feature , typename ... T>
Feature_handle add (T &&... t)
 Instantiates a new feature and adds it to the set. More...
 
bool remove (Feature_handle feature)
 Removes a feature. More...
 
std::size_t size () const
 Returns how many features are defined.
 
Feature_handle operator[] (std::size_t i) const
 Returns the \(i^{th}\) feature.
 
void clear ()
 Removes all features.
 

Member Function Documentation

◆ add()

template<typename Feature , typename ... T>
Feature_handle CGAL::Classification::Feature_set::add ( T &&...  t)

Instantiates a new feature and adds it to the set.

Template Parameters
Featuretype of the feature, inherited from Feature_base.
Ttypes of the parameters of the feature's constructor.
Parameters
tparameters of the feature's constructor.
Returns
a handle to the newly added feature.

◆ remove()

bool CGAL::Classification::Feature_set::remove ( Feature_handle  feature)

Removes a feature.

Parameters
featurethe handle to feature type that must be removed.
Returns
true if the feature was correctly removed, false if its handle was not found.