gtsam 4.2.0
gtsam
Errors.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
18// \callgraph
19
20#pragma once
21
22#include <gtsam/base/FastList.h>
23#include <gtsam/base/Testable.h>
24#include <gtsam/base/Vector.h>
25
26#include <string>
27
28namespace gtsam {
29
30// Forward declarations
31class VectorValues;
32
35
37GTSAM_EXPORT Errors createErrors(const VectorValues& V);
38
40GTSAM_EXPORT void print(const Errors& e, const std::string& s = "Errors");
41
42// Check equality for unit testing.
43GTSAM_EXPORT bool equality(const Errors& actual, const Errors& expected,
44 double tol = 1e-9);
45
47GTSAM_EXPORT Errors operator+(const Errors& a, const Errors& b);
48
50GTSAM_EXPORT Errors operator-(const Errors& a, const Errors& b);
51
53GTSAM_EXPORT Errors operator-(const Errors& a);
54
56GTSAM_EXPORT double dot(const Errors& a, const Errors& b);
57
59GTSAM_EXPORT void axpy(double alpha, const Errors& x, Errors& y);
60
62template <>
63struct traits<Errors> {
64 static void Print(const Errors& e, const std::string& str = "") {
65 print(e, str);
66 }
67 static bool Equals(const Errors& actual, const Errors& expected,
68 double tol = 1e-8) {
69 return equality(actual, expected, tol);
70 }
71};
72
73} // namespace gtsam
typedef and functions to augment Eigen's VectorXd
Concept check for values that can be used in unit tests.
A thin wrapper around std::list that uses boost's fast_pool_allocator.
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:156
Errors operator+(const Errors &a, const Errors &b)
Addition.
Definition: Errors.cpp:60
void axpy(double alpha, const Errors &x, Errors &y)
BLAS level 2 style AXPY, y := alpha*x + y
Definition: Errors.cpp:111
Errors createErrors(const VectorValues &V)
Break V into pieces according to its start indices.
Definition: Errors.cpp:29
double dot(const V1 &a, const V2 &b)
Dot product.
Definition: Vector.h:195
Errors operator-(const Errors &a, const Errors &b)
Subtraction.
Definition: Errors.cpp:75
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition: VectorValues.h:74
The Factor::error simply extracts the.