diff --git a/gtsam/hybrid/hybrid.i b/gtsam/hybrid/hybrid.i index d1b8fbf6d1..9ed96d1154 100644 --- a/gtsam/hybrid/hybrid.i +++ b/gtsam/hybrid/hybrid.i @@ -75,10 +75,12 @@ virtual class HybridConditional { #include class HybridGaussianFactor : gtsam::HybridFactor { HybridGaussianFactor( - const gtsam::KeyVector& continuousKeys, + const gtsam::DiscreteKey& discreteKey, + const std::vector& factors); + HybridGaussianFactor( const gtsam::DiscreteKey& discreteKey, const std::vector>& - factorsList); + factorPairs); void print(string s = "HybridGaussianFactor\n", const gtsam::KeyFormatter& keyFormatter = @@ -88,13 +90,9 @@ class HybridGaussianFactor : gtsam::HybridFactor { #include class HybridGaussianConditional : gtsam::HybridFactor { HybridGaussianConditional( - const gtsam::KeyVector& continuousFrontals, - const gtsam::KeyVector& continuousParents, const gtsam::DiscreteKeys& discreteParents, const gtsam::HybridGaussianConditional::Conditionals& conditionals); HybridGaussianConditional( - const gtsam::KeyVector& continuousFrontals, - const gtsam::KeyVector& continuousParents, const gtsam::DiscreteKey& discreteParent, const std::vector& conditionals); @@ -246,15 +244,15 @@ class HybridNonlinearFactorGraph { #include class HybridNonlinearFactor : gtsam::HybridFactor { HybridNonlinearFactor( - const gtsam::KeyVector& keys, const gtsam::DiscreteKey& discreteKey, + const gtsam::DiscreteKey& discreteKey, const std::vector& factors); HybridNonlinearFactor( - const gtsam::KeyVector& keys, const gtsam::DiscreteKey& discreteKey, + const gtsam::DiscreteKey& discreteKey, const std::vector>& factors); HybridNonlinearFactor( - const gtsam::KeyVector& keys, const gtsam::DiscreteKeys& discreteKeys, + const gtsam::DiscreteKeys& discreteKeys, const gtsam::DecisionTree< gtsam::Key, std::pair>& factors); diff --git a/python/gtsam/tests/test_HybridFactorGraph.py b/python/gtsam/tests/test_HybridFactorGraph.py index 4ec1aec1ed..3c63b91541 100644 --- a/python/gtsam/tests/test_HybridFactorGraph.py +++ b/python/gtsam/tests/test_HybridFactorGraph.py @@ -17,7 +17,7 @@ from gtsam.utils.test_case import GtsamTestCase import gtsam -from gtsam import (DiscreteConditional, DiscreteKeys, GaussianConditional, +from gtsam import (DiscreteConditional, GaussianConditional, HybridBayesNet, HybridGaussianConditional, HybridGaussianFactor, HybridGaussianFactorGraph, HybridValues, JacobianFactor, noiseModel) @@ -102,8 +102,7 @@ def tiny(num_measurements: int = 1, X(0), [0], sigma=3) bayesNet.push_back( - HybridGaussianConditional([Z(i)], [X(0)], mode, - [conditional0, conditional1])) + HybridGaussianConditional(mode, [conditional0, conditional1])) # Create prior on X(0). prior_on_x0 = GaussianConditional.FromMeanAndStddev(