gtsam 4.1.1
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/Vector.h>
24#include <gtsam/base/Testable.h>
25
26#include <string>
27
28namespace gtsam {
29
30 // Forward declarations
31 class VectorValues;
32
34 class Errors : public FastList<Vector> {
35
36 public:
37
38 GTSAM_EXPORT Errors() ;
39
41 GTSAM_EXPORT Errors(const VectorValues&V);
42
44 GTSAM_EXPORT void print(const std::string& s = "Errors") const;
45
47 GTSAM_EXPORT bool equals(const Errors& expected, double tol=1e-9) const;
48
50 GTSAM_EXPORT Errors operator+(const Errors& b) const;
51
53 GTSAM_EXPORT Errors operator-(const Errors& b) const;
54
56 GTSAM_EXPORT Errors operator-() const ;
57
58 }; // Errors
59
63 GTSAM_EXPORT double dot(const Errors& a, const Errors& b);
64
68 template <>
69 GTSAM_EXPORT void axpy(double alpha, const Errors& x, Errors& y);
70
72 GTSAM_EXPORT void print(const Errors& a, const std::string& s = "Error");
73
75 template<>
76 struct traits<Errors> : public Testable<Errors> {
77 };
78
79} //\ namespace gtsam
A thin wrapper around std::list that uses boost's fast_pool_allocator.
Concept check for values that can be used in unit tests.
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
double dot(const V1 &a, const V2 &b)
Dot product.
Definition: Vector.h:194
void GTSAM_DEPRECATED axpy(double alpha, const V1 &x, V2 &y)
BLAS Level 1 axpy: y <- alpha*x + y.
Definition: Vector.h:217
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Definition: FastList.h:40
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:151
vector of errors
Definition: Errors.h:34
GTSAM_EXPORT Errors operator-() const
negation
Definition: Errors.cpp:89
GTSAM_EXPORT Errors operator+(const Errors &b) const
Addition.
Definition: Errors.cpp:60
GTSAM_EXPORT bool equals(const Errors &expected, double tol=1e-9) const
equals, for unit testing
Definition: Errors.cpp:54
GTSAM_EXPORT void print(const std::string &s="Errors") const
print
Definition: Errors.cpp:39
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:74