gtsam
Loading...
Searching...
No Matches
Point1.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
17
18#pragma once
19
20#include <gtsam/base/Manifold.h>
22#include <gtsam/base/VectorSpace.h>
23#include <gtsam/base/std_optional_serialization.h>
24#if GTSAM_ENABLE_BOOST_SERIALIZATION
25#include <boost/serialization/nvp.hpp>
26#endif
27
28#include <iostream>
29#include <optional>
30#include <utility>
31#include <vector>
32
33namespace gtsam {
34
35typedef Vector1 Point1;
36
38using Point1Pair = std::pair<Point1, Point1>;
39using Point1Pairs = std::vector<Point1Pair>;
40
42GTSAM_EXPORT std::ostream& operator<<(std::ostream& os,
43 const gtsam::Point1Pair& p);
44
46GTSAM_EXPORT double norm1(const Point1& p, OptionalJacobian<1, 1> H = {});
47
49GTSAM_EXPORT double distance1(const Point1& p1, const Point1& q,
50 OptionalJacobian<1, 1> H1 = {},
52
53template <typename A1, typename A2>
54struct Range;
55
57template <>
58struct Range<Point1, Point1> {
59 typedef double result_type;
60 double operator()(const Point1& p, const Point1& q,
62 OptionalJacobian<1, 1> H2 = {}) {
63 return distance1(p, q, H1, H2);
64 }
65};
66
67} // namespace gtsam
Special class for optional Jacobian arguments.
Base class and basic functions for Manifold types.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
std::pair< Point1, Point1 > Point1Pair
Convenience typedefs.
Definition Point1.h:38
double norm1(const Point1 &p, OptionalJacobian< 1, 1 > H)
L1 norm (absolute value) of a Point1, with optional Jacobian.
Definition Point1.cpp:28
double distance1(const Point1 &p1, const Point1 &q, OptionalJacobian< 1, 1 > H1, OptionalJacobian< 1, 1 > H2)
Distance between two 1D points, with optional Jacobians.
Definition Point1.cpp:41
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:40
Definition BearingRange.h:42