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 
28 namespace gtsam {
29 
30 // Forward declarations
31 class VectorValues;
32 
35 
37 GTSAM_EXPORT Errors createErrors(const VectorValues& V);
38 
40 GTSAM_EXPORT void print(const Errors& e, const std::string& s = "Errors");
41 
42 // Check equality for unit testing.
43 GTSAM_EXPORT bool equality(const Errors& actual, const Errors& expected,
44  double tol = 1e-9);
45 
47 GTSAM_EXPORT Errors operator+(const Errors& a, const Errors& b);
48 
50 GTSAM_EXPORT Errors operator-(const Errors& a, const Errors& b);
51 
53 GTSAM_EXPORT Errors operator-(const Errors& a);
54 
56 GTSAM_EXPORT double dot(const Errors& a, const Errors& b);
57 
59 GTSAM_EXPORT void axpy(double alpha, const Errors& x, Errors& y);
60 
62 template <>
63 struct 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
VectorValues
Vector.h
typedef and functions to augment Eigen's VectorXd
alpha
RealScalar alpha
Definition: level1_cplx_impl.h:147
s
RealScalar s
Definition: level1_cplx_impl.h:126
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Testable.h
Concept check for values that can be used in unit tests.
gtsam::operator-
Errors operator-(const Errors &a, const Errors &b)
Subtraction.
Definition: Errors.cpp:74
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
gtsam::operator+
Errors operator+(const Errors &a, const Errors &b)
Addition.
Definition: Errors.cpp:59
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
gtsam::VectorValues
Definition: VectorValues.h:74
gtsam::createErrors
Errors createErrors(const VectorValues &V)
Break V into pieces according to its start indices.
Definition: Errors.cpp:28
cholesky::expected
Matrix expected
Definition: testMatrix.cpp:971
gtsam::dot
double dot(const V1 &a, const V2 &b)
Definition: Vector.h:195
gtsam::FastList< Vector >
y
Scalar * y
Definition: level1_cplx_impl.h:124
str
Definition: pytypes.h:1524
gtsam::axpy
void axpy(double alpha, const Errors &x, Errors &y)
BLAS level 2 style AXPY, y := alpha*x + y
Definition: Errors.cpp:110
gtsam::b
const G & b
Definition: Group.h:79
gtsam::equality
bool equality(const Errors &actual, const Errors &expected, double tol)
Definition: Errors.cpp:52
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
gtsam
traits
Definition: chartTesting.h:28
gtsam::traits
Definition: Group.h:36
gtsam::tol
const G double tol
Definition: Group.h:79
V
MatrixXcd V
Definition: EigenSolver_EigenSolver_MatrixType.cpp:15
FastList.h
A thin wrapper around std::list that uses boost's fast_pool_allocator.
gtsam::traits< Errors >::Equals
static bool Equals(const Errors &actual, const Errors &expected, double tol=1e-8)
Definition: Errors.h:67
gtsam::traits< Errors >::Print
static void Print(const Errors &e, const std::string &str="")
Definition: Errors.h:64


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:02:18