40 bool manyModes =
false) {
44 for (
size_t i = 0;
i < num_measurements;
i++) {
49 Z(
i), I_1x1,
X(0), Z_1x1, 0.5),
51 Z(
i), I_1x1,
X(0), Z_1x1, 3)}));
59 const size_t nrModes = manyModes ? num_measurements : 1;
60 for (
size_t i = 0;
i < nrModes;
i++) {
73 size_t num_measurements = 1,
74 std::optional<VectorValues> measurements = {},
75 bool manyModes =
false) {
79 return bayesNet.toFactorGraph(*measurements);
82 return bayesNet.toFactorGraph(bayesNet.sample().continuous());
Matrix< RealScalar, Dynamic, Dynamic > M
A Bayes net of Gaussian Conditionals indexed by discrete keys.
A conditional of gaussian mixtures indexed by discrete variables, as part of a Bayes Network...
void push_back(std::shared_ptr< HybridConditional > conditional)
Add a hybrid conditional using a shared_ptr.
Linearized Hybrid factor graph that uses type erasure.
static shared_ptr sharedMeanAndStddev(Args &&... args)
Create shared pointer by forwarding arguments to fromMeanAndStddev.
HybridGaussianFactorGraph createHybridGaussianFactorGraph(size_t num_measurements=1, std::optional< VectorValues > measurements={}, bool manyModes=false)
void emplace_back(Conditional *conditional)
Eigen::Matrix< double, 1, 1 > Vector1
std::pair< Key, size_t > DiscreteKey
HybridBayesNet createHybridBayesNet(size_t num_measurements=1, bool manyModes=false)