\( \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::Feature::Cluster_variance_of_feature Class Reference

#include <CGAL/Classification/Feature/Cluster_variance_of_feature.h>

Inherits from

CGAL::Classification::Feature_base.

Definition

Feature that computes the variance values of an itemwise feature over the respective items of clusters.

Its default name is "variance_" + the name of the itemwise feature.

Public Member Functions

template<typename ClusterRange >
 Cluster_variance_of_feature (ClusterRange &clusters, Feature_handle itemwise_feature, Feature_handle mean_feature)
 Constructs the feature. More...
 
- Public Member Functions inherited from CGAL::Classification::Feature_base
const std::string & name () const
 Returns the name of the feature (initialized to abstract_feature for Feature_base).
 
void set_name (const std::string &name)
 Changes the name of the feature.
 
virtual float value (std::size_t index)=0
 Returns the value taken by the feature for at the item for the item at position index. More...
 

Constructor & Destructor Documentation

◆ Cluster_variance_of_feature()

template<typename ClusterRange >
CGAL::Classification::Feature::Cluster_variance_of_feature::Cluster_variance_of_feature ( ClusterRange &  clusters,
Feature_handle  itemwise_feature,
Feature_handle  mean_feature 
)

Constructs the feature.

Template Parameters
ClusterRangemodel of ConstRange. Its iterator type is RandomAccessIterator and its value type is the key type of Cluster.
Parameters
clustersinput range.
itemwise_featurefeature that takes values on the range of items from which clusters is a subset.
mean_featureCluster_mean_of_feature computed on itemwise_feature.