gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
25 #include <string>
26 
27 namespace gtsam {
28 
29  // Forward declarations
30  class VectorValues;
31 
33  class Errors : public FastList<Vector> {
34 
35  public:
36 
37  GTSAM_EXPORT Errors() ;
38 
40  GTSAM_EXPORT Errors(const VectorValues&V);
41 
43  GTSAM_EXPORT void print(const std::string& s = "Errors") const;
44 
46  GTSAM_EXPORT bool equals(const Errors& expected, double tol=1e-9) const;
47 
49  GTSAM_EXPORT Errors operator+(const Errors& b) const;
50 
52  GTSAM_EXPORT Errors operator-(const Errors& b) const;
53 
55  GTSAM_EXPORT Errors operator-() const ;
56 
57  }; // Errors
58 
62  GTSAM_EXPORT double dot(const Errors& a, const Errors& b);
63 
67  template <>
68  GTSAM_EXPORT void axpy<Errors,Errors>(double alpha, const Errors& x, Errors& y);
69 
71  GTSAM_EXPORT void print(const Errors& a, const std::string& s = "Error");
72 
73 } // gtsam
typedef and functions to augment Eigen's VectorXd
double dot(const V1 &a, const V2 &b)
Dot product.
Definition: Vector.h:259
void axpy< Errors, Errors >(double alpha, const Errors &x, Errors &y)
BLAS level 2 style.
Definition: Errors.cpp:115
A thin wrapper around std::list that uses boost's fast_pool_allocator.
GTSAM_EXPORT bool equals(const Errors &expected, double tol=1e-9) const
equals, for unit testing
Definition: Errors.cpp:55
void print(const Matrix &A, const string &s, ostream &stream)
print a matrix
Definition: Matrix.cpp:183
GTSAM_EXPORT Errors operator-() const
negation
Definition: Errors.cpp:90
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:89
GTSAM_EXPORT void print(const std::string &s="Errors") const
print
Definition: Errors.cpp:40
Definition: FastList.h:38
vector of errors
Definition: Errors.h:33
GTSAM_EXPORT Errors operator+(const Errors &b) const
Addition.
Definition: Errors.cpp:61