IMP logo
IMP Reference Guide  2.21.0
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. More...
 
bool get_contains (const VectorD< D > &p, double atol=std::numeric_limits< double >::epsilon()) const
 Get whether the point is on the unit simplex. More...
 
virtual int get_dimension () const =0
 Get dimension D of embedded real space. More...
 

Member Function Documentation

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.

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.

template<int D>
virtual int IMP::algebra::UnitSimplexBaseD< D >::get_dimension ( ) const
pure virtual

Get dimension D of embedded real space.

Implemented in IMP::algebra::UnitSimplexD<-1 >, and IMP::algebra::UnitSimplexD< D >.


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