gtsam  4.1.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
Testable.h
Concept check for values that can be used in unit tests.
gtsam::Errors::operator-
GTSAM_EXPORT Errors operator-() const
negation
Definition: Errors.cpp:89
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::Errors
vector of errors
Definition: Errors.h:34
gtsam::VectorValues
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:74
gtsam::FastList
Definition: FastList.h:38
gtsam::Errors::operator+
GTSAM_EXPORT Errors operator+(const Errors &b) const
Addition.
Definition: Errors.cpp:60
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:155
gtsam::Testable
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
Vector.h
typedef and functions to augment Eigen's VectorXd
gtsam::axpy< Errors, Errors >
void axpy< Errors, Errors >(double alpha, const Errors &x, Errors &y)
BLAS level 2 style.
Definition: Errors.cpp:114
FastList.h
A thin wrapper around std::list that uses boost's fast_pool_allocator.
gtsam::Errors::print
GTSAM_EXPORT void print(const std::string &s="Errors") const
print
Definition: Errors.cpp:39
gtsam::dot
double dot(const V1 &a, const V2 &b)
Dot product.
Definition: Vector.h:194
gtsam::Errors::equals
GTSAM_EXPORT bool equals(const Errors &expected, double tol=1e-9) const
equals, for unit testing
Definition: Errors.cpp:54