20 #include <gtsam/base/VectorSpace.h> 21 #include <gtsam/base/std_optional_serialization.h> 22 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 23 #include <boost/serialization/nvp.hpp> 35 using Point2Pair = std::pair<Point2, Point2>;
36 GTSAM_EXPORT std::ostream &operator<<(std::ostream &os,
const gtsam::Point2Pair &p);
38 using Point2Pairs = std::vector<Point2Pair>;
44 GTSAM_EXPORT
double distance2(
const Point2& p1,
const Point2& q,
49 typedef std::vector<Point2, Eigen::aligned_allocator<Point2> > Point2Vector;
52 inline Point2
operator*(
double s,
const Point2& p) {
53 return Point2(s * p.x(), s * p.y());
70 GTSAM_EXPORT std::optional<Point2> circleCircleIntersection(
double R_d,
double r_d,
double tol = 1e-9);
78 GTSAM_EXPORT std::list<Point2> circleCircleIntersection(Point2 c1, Point2 c2, std::optional<Point2> fh);
81 GTSAM_EXPORT Point2Pair
means(
const std::vector<Point2Pair> &abPointPairs);
92 GTSAM_EXPORT std::list<Point2> circleCircleIntersection(Point2 c1,
double r1,
93 Point2 c2,
double r2,
double tol = 1e-9);
95 template <
typename A1,
typename A2>
100 typedef double result_type;
101 double operator()(
const Point2& p,
const Point2& q,
Vector2 Point2
Definition: Point2.h:32
Point2 operator*(double s, const Point2 &p)
multiply with scalar
Definition: Point2.h:52
GTSAM_EXPORT Point2Pair means(const std::vector< Point2Pair > &abPointPairs)
Calculate the two means of a set of Point2 pairs.
Definition: BearingRange.h:41
GTSAM_EXPORT double distance2(const Point2 &p1, const Point2 &q, OptionalJacobian< 1, 2 > H1={}, OptionalJacobian< 1, 2 > H2={})
distance between two points
Definition: chartTesting.h:28
Definition: OptionalJacobian.h:38
GTSAM_EXPORT double norm2(const Point2 &p, OptionalJacobian< 1, 2 > H={})
Distance of the point from the origin, with Jacobian.