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
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
A thin wrapper around std::list that uses boost&#39;s fast_pool_allocator.
Scalar * y
Concept check for values that can be used in unit tests.
double dot(const V1 &a, const V2 &b)
Definition: Vector.h:195
Matrix expected
Definition: testMatrix.cpp:971
Definition: pytypes.h:1403
Errors operator+(const Errors &a, const Errors &b)
Addition.
Definition: Errors.cpp:59
Errors operator-(const Errors &a, const Errors &b)
Subtraction.
Definition: Errors.cpp:74
RealScalar alpha
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RealScalar s
void axpy(double alpha, const Errors &x, Errors &y)
BLAS level 2 style AXPY, y := alpha*x + y
Definition: Errors.cpp:110
const G & b
Definition: Group.h:86
Errors createErrors(const VectorValues &V)
Break V into pieces according to its start indices.
Definition: Errors.cpp:28
traits
Definition: chartTesting.h:28
typedef and functions to augment Eigen&#39;s VectorXd
static void Print(const Errors &e, const std::string &str="")
Definition: Errors.h:64
static bool Equals(const Errors &actual, const Errors &expected, double tol=1e-8)
Definition: Errors.h:67
bool equality(const Errors &actual, const Errors &expected, double tol)
Definition: Errors.cpp:52
const G double tol
Definition: Group.h:86
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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:12