32 typedef Eigen::Matrix<double, N, 1> Base;
45 std::copy(values, values+N, this->data());
85 static size_t dim() {
return Base::max_size; }
87 void print(
const std::string& name=
"")
const {
gtsam::print(Vector(*
this), name); }
90 bool equals(
const FixedVector<M>& other,
double tol=1e-9)
const {
94 bool equals(
const FixedVector& other,
double tol=1e-9)
const {
typedef and functions to augment Eigen's VectorXd
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:155
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
equals with a tolerance
Definition: Matrix.h:84
Fixed size vectors - compatible with boost vectors, but with compile-type size checking.
Definition: FixedVector.h:30
FixedVector()
default constructor
Definition: FixedVector.h:35
FixedVector(const Vector &v)
Convert from a variable-size vector to a fixed size vector.
Definition: FixedVector.h:41
static FixedVector basis(size_t i)
Create basis vector, with one in spot i.
Definition: FixedVector.h:73
FixedVector(const FixedVector &v)
copy constructors
Definition: FixedVector.h:38
static FixedVector delta(size_t i, double value)
Create basis vector of with a constant in spot i.
Definition: FixedVector.h:63
static FixedVector zero()
Create zero vector.
Definition: FixedVector.h:78
static FixedVector ones()
Create vector initialized to ones.
Definition: FixedVector.h:83
static FixedVector repeat(double value)
Create vector initialized to a constant value.
Definition: FixedVector.h:52
FixedVector(const double *values)
Initialize with a C-style array.
Definition: FixedVector.h:44