20 #include <boost/range/adaptor/map.hpp> 33 for(
const Vector&
e: V | boost::adaptors::map_values) {
46 struct equalsVector :
public std::function<bool(const Vector&, const Vector&)> {
55 if(
size() != expected.size() )
return false;
64 throw(std::invalid_argument(
"Errors::operator+: incompatible sizes"));
67 Errors::const_iterator it = b.begin();
69 result.push_back(ai + *(it++));
79 throw(std::invalid_argument(
"Errors::operator-: incompatible sizes"));
82 Errors::const_iterator it = b.begin();
84 result.push_back(ai - *(it++));
92 result.push_back(-ai);
103 throw(std::invalid_argument(
"Errors::dot: incompatible sizes"));
106 Errors::const_iterator it = b.begin();
115 Errors::const_iterator it = x.begin();
117 axpy(alpha,*(it++),yi);
void print(const Matrix &A, const string &s, ostream &stream)
const mpreal ai(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
double dot(const V1 &a, const V2 &b)
equalsVector(double tol=1e-9)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
bool operator()(const Vector &expected, const Vector &actual)
void print(const Errors &a, const string &s)
void axpy< Errors, Errors >(double alpha, const Errors &x, Errors &y)
Jet< T, N > operator-(const Jet< T, N > &f)
GTSAM_EXPORT void print(const std::string &s="Errors") const
int EIGEN_BLAS_FUNC() axpy(const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *py, const int *incy)
bool equal(const T &obj1, const T &obj2, double tol)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Jet< T, N > const & operator+(const Jet< T, N > &f)
double dot(const Errors &a, const Errors &b)