Add predicate concept

This commit is contained in:
Simon Giraudot 2017-03-27 10:35:09 +02:00
parent 56c8e7c761
commit ea5dbb8315
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
namespace CGAL
{
namespace Classification
{
/*!
\ingroup PkgClassificationConcepts
\cgalConcept
Concept describing a predicate used by classification functions (see
`CGAL::classify()`, `CGAL::classify_with_local_smoothing()` and
`CGAL::classify_with_graphcut()`).
\cgalHasModel `CGAL::Classification::Sum_of_weighted_features_predicate`
\cgalHasModel `CGAL::Classification::Random_forest_predicate`
*/
class Predicate
{
public:
/*!
\brief Returns, for each label indexed from 0 to `out.size()`, the
probability of the point at `item_index` to belong to this label.
*/
void probabilities (std::size_t item_index, std::vector<double>& out) const;
};
} // namespace Classification
} // namespace CGAL