IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::algebra::UnitSimplexBaseD< D > Class Template Referenceabstract

Base class for a unit simplex embedded in D-dimensional real space. More...

#include <IMP/algebra/UnitSimplexD.h>

Inheritance diagram for IMP::algebra::UnitSimplexBaseD< D >:

Detailed Description

template<int D>
class IMP::algebra::UnitSimplexBaseD< D >

Base class for a unit simplex embedded in D-dimensional real space.

See UnitSimplexD for more information.

Definition at line 29 of file UnitSimplexD.h.

Public Member Functions

VectorD< D > get_barycenter () const
 Get center of mass on simplex in embedded coordinates.
bool get_contains (const VectorD< D > &p, double atol=std::numeric_limits< double >::epsilon()) const
 Get whether the point is on the unit simplex.
virtual int get_dimension () const =0
 Get dimension D of embedded real space.

Member Function Documentation

◆ get_barycenter()

template<int D>
VectorD< D > IMP::algebra::UnitSimplexBaseD< D >::get_barycenter ( ) const

Get center of mass on simplex in embedded coordinates.

This is equivalent to the ones vector divided by D.

Definition at line 36 of file UnitSimplexD.h.

Here is the call graph for this function:

◆ get_contains()

template<int D>
bool IMP::algebra::UnitSimplexBaseD< D >::get_contains ( const VectorD< D > & p,
double atol = std::numeric_limits<double>::epsilon() ) const

Get whether the point is on the unit simplex.

Parameters
[in]pPoint
[in]atolAbsolute tolerance of error for each element. Total tolerance is atol*d.

Definition at line 47 of file UnitSimplexD.h.

Here is the call graph for this function:

◆ get_dimension()


The documentation for this class was generated from the following file: