GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
gtsam::FixedVector< N > Class Template Reference

#include <FixedVector.h>

Inheritance diagram for gtsam::FixedVector< N >:
Inheritance graph
[legend]
Collaboration diagram for gtsam::FixedVector< N >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 FixedVector ()
 
 FixedVector (const FixedVector &v)
 
 FixedVector (const Vector &v)
 
 FixedVector (const double *values)
 
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)
 
static FixedVector delta (size_t i, double value)
 
static FixedVector basis (size_t i)
 
static FixedVector zero ()
 
static FixedVector ones ()
 
static size_t dim ()
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ FixedVector() [1/4]

template<size_t N>
gtsam::FixedVector< N >::FixedVector ( )
inline

default constructor

◆ FixedVector() [2/4]

template<size_t N>
gtsam::FixedVector< N >::FixedVector ( const FixedVector< N > &  v)
inline

copy constructors

◆ FixedVector() [3/4]

template<size_t N>
gtsam::FixedVector< N >::FixedVector ( const Vector &  v)
inline

Convert from a variable-size vector to a fixed size vector

◆ FixedVector() [4/4]

template<size_t N>
gtsam::FixedVector< N >::FixedVector ( const double *  values)
inline

Initialize with a C-style array

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

◆ ones()

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

Create vector initialized to ones

◆ repeat()

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

Create vector initialized to a constant value

Parameters
valueconstant value

◆ zero()

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

Create zero vector


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