Loading...
Searching...
No Matches
ompl::base::ProjectionMatrix Class Reference

A projection matrix – it allows multiplication of real vectors by a specified matrix. The matrix can also be randomly generated. More...

#include <ompl/base/ProjectionEvaluator.h>

Public Types

using Matrix = Eigen::MatrixXd
 Datatype for projection matrices.

Public Member Functions

void computeRandom (unsigned int from, unsigned int to, const std::vector< double > &scale)
 Wrapper for ComputeRandom(from, to, scale)
void computeRandom (unsigned int from, unsigned int to)
 Wrapper for ComputeRandom(from, to)
void project (const double *from, Eigen::Ref< Eigen::VectorXd > to) const
 Multiply the vector from by the contained projection matrix to obtain the vector to.
void print (std::ostream &out=std::cout) const
 Print the contained projection matrix to a stram.

Static Public Member Functions

static Matrix ComputeRandom (unsigned int from, unsigned int to, const std::vector< double > &scale)
 Compute a random projection matrix with from columns and to rows. A vector with from elements can be multiplied by this matrix in order to produce a vector with to elements.
static Matrix ComputeRandom (unsigned int from, unsigned int to)
 Compute a random projection matrix with from columns and to rows. A vector with from elements can be multiplied by this matrix in order to produce a vector with to elements. This uses the function above called with an empty scale vector.

Public Attributes

Matrix mat
 Projection matrix.

Detailed Description

A projection matrix – it allows multiplication of real vectors by a specified matrix. The matrix can also be randomly generated.

Definition at line 58 of file ProjectionEvaluator.h.

Member Typedef Documentation

◆ Matrix

using ompl::base::ProjectionMatrix::Matrix = Eigen::MatrixXd

Datatype for projection matrices.

Definition at line 62 of file ProjectionEvaluator.h.

Member Function Documentation

◆ ComputeRandom() [1/2]

ompl::base::ProjectionMatrix::Matrix ompl::base::ProjectionMatrix::ComputeRandom ( unsigned int from,
unsigned int to )
static

Compute a random projection matrix with from columns and to rows. A vector with from elements can be multiplied by this matrix in order to produce a vector with to elements. This uses the function above called with an empty scale vector.

Each element is sampled with a Gaussian distribution with mean 0 and variance 1 and the matrix rows are made orthonormal.

Definition at line 83 of file ProjectionEvaluator.cpp.

◆ ComputeRandom() [2/2]

ompl::base::ProjectionMatrix::Matrix ompl::base::ProjectionMatrix::ComputeRandom ( unsigned int from,
unsigned int to,
const std::vector< double > & scale )
static

Compute a random projection matrix with from columns and to rows. A vector with from elements can be multiplied by this matrix in order to produce a vector with to elements.

If the scale argument is specified, the columns of the matrix are divided by the corresponding scaling argument: all elements (rows) in column[i] are divided by scale[i]. This is useful to specify if scaling of the elements of the state is to be applied before projection. If the scale for a column is 0, the column itself is set to 0.

Each element is sampled with a Gaussian distribution with mean 0 and variance 1 and the matrix rows are made orthonormal.

Definition at line 48 of file ProjectionEvaluator.cpp.

◆ computeRandom() [1/2]

void ompl::base::ProjectionMatrix::computeRandom ( unsigned int from,
unsigned int to )

Wrapper for ComputeRandom(from, to)

Definition at line 95 of file ProjectionEvaluator.cpp.

◆ computeRandom() [2/2]

void ompl::base::ProjectionMatrix::computeRandom ( unsigned int from,
unsigned int to,
const std::vector< double > & scale )

Wrapper for ComputeRandom(from, to, scale)

Definition at line 89 of file ProjectionEvaluator.cpp.

◆ print()

void ompl::base::ProjectionMatrix::print ( std::ostream & out = std::cout) const

Print the contained projection matrix to a stram.

Definition at line 105 of file ProjectionEvaluator.cpp.

◆ project()

void ompl::base::ProjectionMatrix::project ( const double * from,
Eigen::Ref< Eigen::VectorXd > to ) const

Multiply the vector from by the contained projection matrix to obtain the vector to.

Definition at line 100 of file ProjectionEvaluator.cpp.

Member Data Documentation

◆ mat

Matrix ompl::base::ProjectionMatrix::mat

Projection matrix.

Definition at line 106 of file ProjectionEvaluator.h.


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