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

Represent a unit simplex embedded in D-dimensional real space. More...

#include <IMP/algebra/UnitSimplexD.h>

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

Detailed Description

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

Represent a unit simplex embedded in D-dimensional real space.

The unit simplex (also known as standard simplex or probability simplex) is the manifold of vectors of probabilities that sum to 1: \( \Delta^{D-1} = \{ (t_1,\dots,t_D) \in \mathbb{R}^D \mid \sum_{d=1}^D t_d = 1, t_d \ge 0 \} \)

See geometric primitives for more information.

Definition at line 70 of file UnitSimplexD.h.

Public Member Functions

int get_dimension () const override
 Get dimension D of embedded real space.
void show (std::ostream &out=std::cout) const
Public Member Functions inherited from IMP::algebra::UnitSimplexBaseD< D >
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.

Constructor & Destructor Documentation

◆ UnitSimplexD()

template<int D>
IMP::algebra::UnitSimplexD< D >::UnitSimplexD ( )

Definition at line 76 of file UnitSimplexD.h.

Member Function Documentation

◆ get_dimension()

template<int D>
int IMP::algebra::UnitSimplexD< D >::get_dimension ( ) const
overridevirtual

Get dimension D of embedded real space.

Implements IMP::algebra::UnitSimplexBaseD< D >.

Definition at line 79 of file UnitSimplexD.h.


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