Go to the documentation of this file.
29 using namespace gtsam;
38 MixtureFactor::const_iterator const_it = factor.
begin();
40 MixtureFactor::iterator it = factor.
begin();
48 double between0 = 0.0;
49 double between1 = 1.0;
52 auto model = noiseModel::Diagonal::Sigmas(
sigmas,
false);
55 std::make_shared<BetweenFactor<double>>(
X(1),
X(2), between0,
model);
57 std::make_shared<BetweenFactor<double>>(
X(1),
X(2), between1,
model);
58 std::vector<NonlinearFactor::shared_ptr>
factors{f0,
f1};
66 0 Leaf Nonlinear factor on 2 keys
67 1 Leaf Nonlinear factor on 2 keys
76 double between0 = 0.0;
77 double between1 = 1.0;
80 auto model = noiseModel::Diagonal::Sigmas(
sigmas,
false);
83 std::make_shared<BetweenFactor<double>>(
X(1),
X(2), between0,
model);
85 std::make_shared<BetweenFactor<double>>(
X(1),
X(2), between1,
model);
86 std::vector<NonlinearFactor::shared_ptr>
factors{f0,
f1};
97 continuousValues.
insert<
double>(
X(1), 0);
98 continuousValues.
insert<
double>(
X(2), 1);
101 mixtureFactor.errorTree(continuousValues);
104 std::vector<DiscreteKey> discrete_keys = {
m1};
105 std::vector<double> errors = {0.5, 0};
static int runAllTests(TestResult &result)
#define EXPECT_LONGS_EQUAL(expected, actual)
#define EXPECT(condition)
bool assert_print_equal(const std::string &expected, const V &actual, const std::string &s="")
const GaussianFactorGraph factors
const_iterator begin() const
Provides additional testing facilities for common data structures.
Eigen::Matrix< double, 1, 1 > Vector1
TEST(MixtureFactor, Constructor)
static MixtureFactor getMixtureFactor()
const_iterator end() const
noiseModel::Diagonal::shared_ptr model
Nonlinear Mixture factor of continuous and discrete.
std::pair< Key, size_t > DiscreteKey
void insert(Key j, const Value &val)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Implementation of a discrete conditional mixture factor.
The matrix class, also used for vectors and row-vectors.
Point2 f1(const Point3 &p, OptionalJacobian< 2, 3 > H)
Matrix< RealScalar, Dynamic, Dynamic > M
gtsam
Author(s):
autogenerated on Mon Jul 1 2024 03:06:52