gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vector.h File Reference

typedef and functions to augment Eigen's VectorXd More...

Go to the source code of this file.

Namespaces

 gtsam
 Global functions in a separate testing namespace.
 

Typedefs

typedef Eigen::VectorXd gtsam::Vector
 
typedef Eigen::Vector2d gtsam::Vector2
 
typedef Eigen::Vector3d gtsam::Vector3
 
typedef Eigen::Matrix< double, 6, 1 > gtsam::Vector6
 
typedef Eigen::VectorBlock
< Vector > 
gtsam::SubVector
 
typedef Eigen::VectorBlock
< const Vector > 
gtsam::ConstSubVector
 

Functions

Vector gtsam::repeat (size_t n, double value)
 Create vector initialized to a constant value. More...
 
Vector gtsam::delta (size_t n, size_t i, double value)
 Create basis vector of dimension n, with a constant in spot i. More...
 
Vector gtsam::basis (size_t n, size_t i)
 Create basis vector of dimension n, with one in spot i. More...
 
Vector gtsam::zero (size_t n)
 Create zero vector. More...
 
Vector gtsam::ones (size_t n)
 Create vector initialized to ones. More...
 
bool gtsam::zero (const Vector &v)
 check if all zero
 
size_t gtsam::dim (const Vector &v)
 dimensionality == size
 
void gtsam::print (const Vector &v, const std::string &s="", std::ostream &stream=std::cout)
 print with optional string
 
void gtsam::save (const Vector &A, const std::string &s, const std::string &filename)
 save a vector to file, which can be loaded by matlab
 
bool gtsam::operator== (const Vector &vec1, const Vector &vec2)
 operator==()
 
bool gtsam::greaterThanOrEqual (const Vector &v1, const Vector &v2)
 Greater than or equal to operation returns true if all elements in v1 are greater than corresponding elements in v2.
 
bool gtsam::equal_with_abs_tol (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 VecA == VecB up to tolerance.
 
bool gtsam::equal_with_abs_tol (const SubVector &vec1, const SubVector &vec2, double tol)
 
bool gtsam::equal (const Vector &vec1, const Vector &vec2, double tol)
 Override of equal in Lie.h.
 
bool gtsam::equal (const Vector &vec1, const Vector &vec2)
 Override of equal in Lie.h.
 
bool gtsam::assert_equal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Same, prints if error. More...
 
bool gtsam::assert_inequal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Not the same, prints if error. More...
 
bool gtsam::assert_equal (const SubVector &vec1, const SubVector &vec2, double tol=1e-9)
 Same, prints if error. More...
 
bool gtsam::assert_equal (const ConstSubVector &expected, const ConstSubVector &actual, double tol)
 
bool gtsam::linear_dependent (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 check whether two vectors are linearly dependent More...
 
ConstSubVector gtsam::sub (const Vector &v, size_t i1, size_t i2)
 extract subvector, slice semantics, i.e. More...
 
void gtsam::subInsert (Vector &fullVector, const Vector &subVector, size_t i)
 Inserts a subvector into a vector IN PLACE. More...
 
Vector gtsam::emul (const Vector &a, const Vector &b)
 elementwise multiplication More...
 
Vector gtsam::ediv (const Vector &a, const Vector &b)
 elementwise division More...
 
Vector gtsam::ediv_ (const Vector &a, const Vector &b)
 elementwise division, but 0/0 = 0, not inf More...
 
double gtsam::sum (const Vector &a)
 sum vector elements More...
 
double gtsam::norm_2 (const Vector &v)
 Calculates L2 norm for a vector modeled after boost.ublas for compatibility. More...
 
Vector gtsam::reciprocal (const Vector &a)
 Elementwise reciprocal of vector elements. More...
 
Vector gtsam::esqrt (const Vector &v)
 Elementwise sqrt of vector elements. More...
 
Vector gtsam::abs (const Vector &v)
 Absolute values of vector elements. More...
 
double gtsam::max (const Vector &a)
 Return the max element of a vector. More...
 
template<class V1 , class V2 >
double gtsam::dot (const V1 &a, const V2 &b)
 Dot product.
 
template<class V1 , class V2 >
double gtsam::inner_prod (const V1 &a, const V2 &b)
 compatibility version for ublas' inner_prod()
 
void gtsam::scal (double alpha, Vector &x)
 BLAS Level 1 scal: x <- alpha*x. More...
 
template<class V1 , class V2 >
void gtsam::axpy (double alpha, const V1 &x, V2 &y)
 BLAS Level 1 axpy: y <- alpha*x + y. More...
 
void gtsam::axpy (double alpha, const Vector &x, SubVector y)
 
pair< double, Vector > gtsam::house (const Vector &x)
 house(x,j) computes HouseHolder vector v and scaling factor beta from x, such that the corresponding Householder reflection zeroes out all but x. More...
 
double gtsam::houseInPlace (Vector &x)
 beta = house(x) computes the HouseHolder vector in place
 
pair< Vector, double > gtsam::weightedPseudoinverse (const Vector &v, const Vector &weights)
 Weighted Householder solution vector, a.k.a., the pseudoinverse of the column NOTE: if any sigmas are zero (indicating a constraint) the pseudoinverse will be a selection vector, and the variance will be zero. More...
 
double gtsam::weightedPseudoinverse (const Vector &a, const Vector &weights, Vector &pseudo)
 
Vector gtsam::concatVectors (const std::list< Vector > &vs)
 concatenate Vectors
 
Vector gtsam::concatVectors (size_t nrVectors,...)
 concatenate Vectors
 
template<class Archive >
void boost::serialization::save (Archive &ar, const gtsam::Vector &v, unsigned int version)
 
template<class Archive >
void boost::serialization::load (Archive &ar, gtsam::Vector &v, unsigned int version)
 
template<class Archive , int D>
void boost::serialization::save (Archive &ar, const Eigen::Matrix< double, D, 1 > &v, unsigned int version)
 
template<class Archive , int D>
void boost::serialization::load (Archive &ar, Eigen::Matrix< double, D, 1 > &v, unsigned int version)
 

Detailed Description

typedef and functions to augment Eigen's VectorXd

Author
Kai Ni
Frank Dellaert