TVM  0.9.2
tvm::Space Class Reference

#include <tvm/Space.h>

Public Types

enum  Type { Type::Euclidean, Type::SO3, Type::SE3, Type::Unspecified }
 

Public Member Functions

 Space (int size)
 
 Space (int size, int representationSize)
 
 Space (int size, int representationSize, int tangentRepresentationSize)
 
 Space (Type type, int size=-1)
 
std::unique_ptr< VariablecreateVariable (std::string_view name) const
 
int size () const
 
int rSize () const
 
int tSize () const
 
Type type () const
 
bool isEuclidean () const
 
std::string sizeAsString () const
 
bool operator== (const Space &other) const
 
bool operator!= (const Space &other) const
 
bool operator<= (const Space &other) const
 

Friends

Space operator* (const Space &s1, const Space &s2)
 

Detailed Description

Description of a variable space, and factory for Variable.

The space can have up to 3 different sizes, although Euclidean spaces will have only one :

  • the size of the space as a manifold,
  • the size of the vector needed to represent one variable (point) in this space (representation space, rsize),
  • the size of the vector needed to represent a derivative (velocity, acceleration, ...) of this variable (tangent space, tsize).

Here are a few examples:

  • R^n has a size, rsize and tsize of n,
  • SO(3), the 3d rotation space, when represented by quaternions, has a size of 3, a rsize of 4 and a tsize of 3,
  • S(2), the sphere in dimension 3 has a size of 2, and rsize and tsize of 3.

Member Enumeration Documentation

◆ Type

enum tvm::Space::Type
strong

Predefined space types.

Enumerator
Euclidean 
SO3 

Euclidean space \( \mathbb{R}^n \).

SE3 

Space of 3d rotations, represented by unit quaternions.

Unspecified 

Space of 3d transformation, represented by a quaternion and a 3d-vector. Non-euclidean space of unknown type.

Constructor & Destructor Documentation

◆ Space() [1/4]

tvm::Space::Space ( int  size)

Constructor for an Euclidean space

Parameters
sizesize of the space

◆ Space() [2/4]

tvm::Space::Space ( int  size,
int  representationSize 
)

Constructor for a manifold with tsize = size

Parameters
sizesize of the space
representationSizesize of the vector needed to represent a variable

◆ Space() [3/4]

tvm::Space::Space ( int  size,
int  representationSize,
int  tangentRepresentationSize 
)

Constructor for a manifold where tsize != size

Parameters
sizesize of the space
representationSizesize of the vector needed to represent a variable
tangentRepresentationSizesize of the vector needed to represent a derivative

◆ Space() [4/4]

tvm::Space::Space ( Type  type,
int  size = -1 
)

Constructor for a given space type

Parameters
typetype of space
sizesize of the space. Only for space types whose size is not fixed.

Member Function Documentation

◆ createVariable()

std::unique_ptr<Variable> tvm::Space::createVariable ( std::string_view  name) const

Factory function to create a variable.

◆ isEuclidean()

bool tvm::Space::isEuclidean ( ) const

Check if this is an Euclidean space.

◆ operator!=()

bool tvm::Space::operator!= ( const Space other) const
inline

◆ operator<=()

bool tvm::Space::operator<= ( const Space other) const
inline

◆ operator==()

bool tvm::Space::operator== ( const Space other) const
inline

◆ rSize()

int tvm::Space::rSize ( ) const

Size of the vector needed to represent a variable in this space.

◆ size()

int tvm::Space::size ( ) const

Size of the space (as a manifold)

◆ sizeAsString()

std::string tvm::Space::sizeAsString ( ) const

Return size triplet as string

◆ tSize()

int tvm::Space::tSize ( ) const

Size of the vector needed to represent a derivative in this space.

◆ type()

Type tvm::Space::type ( ) const

Type of the space.

Friends And Related Function Documentation

◆ operator*

Space operator* ( const Space s1,
const Space s2 
)
friend

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