gtsam  4.0.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/Vector.h>
24 #include <gtsam/base/Testable.h>
25 
26 #include <string>
27 
28 namespace 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<Errors,Errors>(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
double dot(const V1 &a, const V2 &b)
Dot product.
Definition: Vector.h:162
void axpy< Errors, Errors >(double alpha, const Errors &x, Errors &y)
BLAS level 2 style.
Definition: Errors.cpp:114
GTSAM_EXPORT Errors operator-() const
negation
Definition: Errors.cpp:89
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
A thin wrapper around std::list that uses boost's fast_pool_allocator.
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
vector of errors
Definition: Errors.h:34
Definition: FastList.h:38
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:73
GTSAM_EXPORT bool equals(const Errors &expected, double tol=1e-9) const
equals, for unit testing
Definition: Errors.cpp:54
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_EXPORT void print(const std::string &s="Errors") const
print
Definition: Errors.cpp:39
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Concept check for values that can be used in unit tests.
GTSAM_EXPORT Errors operator+(const Errors &b) const
Addition.
Definition: Errors.cpp:60
typedef and functions to augment Eigen's VectorXd