Loading...
Searching...
No Matches
Errors.h
Go to the documentation of this file.
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
// \callgraph
#pragma once
#include <gtsam/base/FastList.h>
#include <gtsam/base/Testable.h>
#include <gtsam/base/Vector.h>
#include <string>
namespace gtsam {
// Forward declarations
class VectorValues;
using Errors = FastList<Vector>;
GTSAM_EXPORT Errors createErrors(const VectorValues& V);
GTSAM_EXPORT void print(const Errors& e, const std::string& s = "Errors");
// Check equality for unit testing.
GTSAM_EXPORT bool equality(const Errors& actual, const Errors& expected,
double tol = 1e-9);
GTSAM_EXPORT Errors operator+(const Errors& a, const Errors& b);
GTSAM_EXPORT Errors operator-(const Errors& a, const Errors& b);
GTSAM_EXPORT Errors operator-(const Errors& a);
GTSAM_EXPORT double dot(const Errors& a, const Errors& b);
GTSAM_EXPORT void axpy(double alpha, const Errors& x, Errors& y);
template <>
struct traits<Errors> {
static void Print(const Errors& e, const std::string& str = "") {
print(e, str);
}
static bool Equals(const Errors& actual, const Errors& expected,
double tol = 1e-8) {
return equality(actual, expected, tol);
}
};
} // namespace gtsam
Testable.h
Concept check for values that can be used in unit tests.
Vector.h
typedef and functions to augment Eigen's VectorXd
FastList.h
A thin wrapper around std::list that uses boost's fast_pool_allocator.
gtsam
Global functions in a separate testing namespace.
Definition chartTesting.h:28
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
gtsam::operator+
Errors operator+(const Errors &a, const Errors &b)
Addition.
Definition Errors.cpp:60
gtsam::axpy
void axpy(double alpha, const Errors &x, Errors &y)
BLAS level 2 style AXPY, y := alpha*x + y.
Definition Errors.cpp:111
gtsam::Errors
FastList< Vector > Errors
Errors is a vector of errors.
Definition Errors.h:34
gtsam::createErrors
Errors createErrors(const VectorValues &V)
Break V into pieces according to its start indices.
Definition Errors.cpp:29
gtsam::dot
double dot(const V1 &a, const V2 &b)
Dot product.
Definition Vector.h:205
gtsam::operator-
Errors operator-(const Errors &a, const Errors &b)
Subtraction.
Definition Errors.cpp:75
gtsam::traits
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
gtsam::FastList
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the de...
Definition FastList.h:40
gtsam::VectorValues
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74