22 using namespace gtsam;
44 EXPECT(check_group_invariants(
p1, p2));
45 EXPECT(check_manifold_invariants(
p1, p2));
92 Point3 r = p +
Point3(0.8, 0, 0);
93 Point3
t = p +
Point3(0, 0.3, -0.4);
101 boost::function<double(const Point3&, const Point3&)>
f =
102 [](
const Point3&
p,
const Point3&
q) {
return gtsam::dot(p, q); };
123 boost::function<Point3(const Point3&, const Point3&)>
f =
124 boost::bind(&
gtsam::cross, _1, _2, boost::none, boost::none);
126 cross(omega, theta, aH1, aH2);
135 Point3 r = p +
Point3(0.8, 0, 0);
142 boost::function<Point3(const Point3&, const Point3&)>
f = boost::bind(&
gtsam::cross, _1, _2,
143 boost::none, boost::none);
162 Matrix expectedH = numericalDerivative11<Point3, Point3>(
170 Point3 a1(0, 0, 0), a2(1, 2, 3), a3(5, 4, 3);
171 std::vector<Point3> a_points{a1, a2, a3};
177 Point3 a_mean(2, 2, 2), b_mean(-1, 1, 0);
179 Point3 a1(0, 0, 0), a2(1, 2, 3), a3(5, 4, 3);
181 std::vector<Point3Pair> point_pairs{{a1,
b1}, {a2,
b2}, {a3, b3}};
189 return double(point.norm());
207 Point3 P(1., 12.8, -32.),
Q(52.7, 4.9, -13.3);
210 double expectedDistance = 55.542686;
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
double dot(const V1 &a, const V2 &b)
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 y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set origin
#define DOUBLES_EQUAL(expected, actual, threshold)
BOOST_CONCEPT_ASSERT((boost::RandomAccessRangeConcept< ListOfOneContainer< int > >))
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Some functions to compute numerical derivatives.
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const boost::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
#define GTSAM_CONCEPT_LIE_INST(T)
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
Point3 mean(const CONTAINER &points)
mean
double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1, OptionalJacobian< 1, 3 > H2)
distance between two points
static void normalize(Signature::Row &row)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(boost::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
static Point3 P(0.2, 0.7,-2)
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
#define EXPECT(condition)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EIGEN_DEVICE_FUNC const Scalar & q
double norm3(const Point3 &p, OptionalJacobian< 1, 3 > H)
Distance of the point from the origin, with Jacobian.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Annotation to mark enums as an arithmetic type.
The quaternion class used to represent 3D orientations and rotations.
Point3Pair means(const std::vector< Point3Pair > &abPointPairs)
Calculate the two means of a set of Point3 pairs.
TEST(LPInitSolver, InfiniteLoopSingleVar)
double testFunc(const Point3 &P, const Point3 &Q)
double norm_proxy(const Point3 &point)
#define GTSAM_CONCEPT_TESTABLE_INST(T)
std::pair< Point3, Point3 > Point3Pair