gtsam 4.1.1
gtsam
gtsam::FixedVector< N > Class Template Reference

Detailed Description

template<size_t N>
class gtsam::FixedVector< N >

Fixed size vectors - compatible with boost vectors, but with compile-type size checking.

+ Inheritance diagram for gtsam::FixedVector< N >:

Public Member Functions

 FixedVector ()
 default constructor
 
 FixedVector (const FixedVector &v)
 copy constructors
 
 FixedVector (const Vector &v)
 Convert from a variable-size vector to a fixed size vector.
 
 FixedVector (const double *values)
 Initialize with a C-style array.
 
void print (const std::string &name="") const
 
template<size_t M>
bool equals (const FixedVector< M > &other, double tol=1e-9) const
 
bool equals (const FixedVector &other, double tol=1e-9) const
 

Static Public Member Functions

static FixedVector repeat (double value)
 Create vector initialized to a constant value. More...
 
static FixedVector delta (size_t i, double value)
 Create basis vector of with a constant in spot i. More...
 
static FixedVector basis (size_t i)
 Create basis vector, with one in spot i. More...
 
static FixedVector zero ()
 Create zero vector.
 
static FixedVector ones ()
 Create vector initialized to ones.
 
static size_t dim ()
 

Public Types

typedef Eigen::Matrix< double, N, 1 > Base
 

Member Function Documentation

◆ basis()

template<size_t N>
static FixedVector gtsam::FixedVector< N >::basis ( size_t  i)
inlinestatic

Create basis vector, with one in spot i.

Parameters
iindex of the one
Returns
basis vector

◆ delta()

template<size_t N>
static FixedVector gtsam::FixedVector< N >::delta ( size_t  i,
double  value 
)
inlinestatic

Create basis vector of with a constant in spot i.

Parameters
iindex of the one
valueis the value to insert into the vector
Returns
delta vector

◆ repeat()

template<size_t N>
static FixedVector gtsam::FixedVector< N >::repeat ( double  value)
inlinestatic

Create vector initialized to a constant value.

Parameters
valueconstant value

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