24#include <gtsam/config.h>
25#include <gtsam/base/VectorSpace.h>
27#include <gtsam/dllexport.h>
29#if GTSAM_ENABLE_BOOST_SERIALIZATION
30#include <boost/serialization/nvp.hpp>
39using Point3Vector = std::vector<Point3, Eigen::aligned_allocator<Point3>>;
42using Point3Pair = std::pair<Point3, Point3>;
43GTSAM_EXPORT std::ostream &operator<<(std::ostream &os,
const gtsam::Point3Pair &p);
45using Point3Pairs = std::vector<Point3Pair>;
50 OptionalJacobian<1, 3> H2 = {});
74template <
class CONTAINER>
76 if (points.size() == 0)
throw std::invalid_argument(
"Point3::mean input container is empty");
78 sum = std::accumulate(points.begin(), points.end(), sum);
79 return sum / points.size();
83GTSAM_EXPORT Point3Pair
means(
const std::vector<Point3Pair> &abPointPairs);
85template <
typename A1,
typename A2>
90 typedef double result_type;
typedef and functions to augment Eigen's VectorXd
serialization for Vectors
Global functions in a separate testing namespace.
Definition chartTesting.h:28
Point3 mean(const CONTAINER &points)
mean
Definition Point3.h:75
Vector3 Point3
As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
Definition Point3.h:38
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
Definition Point3.cpp:66
double norm3(const Point3 &p, OptionalJacobian< 1, 3 > H)
Distance of the point from the origin, with Jacobian.
Definition Point3.cpp:42
Point2Pair means(const std::vector< Point2Pair > &abPointPairs)
Calculate the two means of a set of Point2 pairs.
Definition Point2.cpp:116
double dot(const V1 &a, const V2 &b)
Dot product.
Definition Vector.h:191
double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1, OptionalJacobian< 1, 3 > H2)
distance between two points
Definition Point3.cpp:29
Point3 doubleCross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
double cross product
Definition Point3.cpp:74
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