64 using shared_ptr = std::shared_ptr<This>;
66 using sharedFactor = std::shared_ptr<GaussianFactor>;
91 const std::vector<GaussianFactor::shared_ptr> &
factors);
103 const std::vector<GaussianFactorValuePair> &factorPairs);
161 std::shared_ptr<Factor> restrict(
175 static FactorValuePairs augment(
const FactorValuePairs &factors);
178 struct ConstructorHelper;
183#if GTSAM_ENABLE_BOOST_SERIALIZATION
185 friend class boost::serialization::access;
186 template <
class ARCHIVE>
187 void serialize(ARCHIVE &ar,
const unsigned int ) {
188 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
189 ar &BOOST_SERIALIZATION_NVP(factors_);
specialized key for discrete variables
Algebraic Decision Trees.
Decision Tree for use in DiscreteFactors.
Linear Factor Graph where all factors are Gaussians.
A factor with a quadratic error function - a Gaussian.
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:38
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
std::pair< GaussianFactor::shared_ptr, double > GaussianFactorValuePair
Alias for pair of GaussianFactor::shared_pointer and a double value.
Definition HybridGaussianFactor.h:38
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:152
An algebraic decision tree fixes the range of a DecisionTree to double.
Definition AlgebraicDecisionTree.h:41
a decision tree is a function from assignments to values.
Definition DecisionTree.h:62
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:41
A map from keys to values.
Definition DiscreteValues.h:34
HybridFactor()=default
Default constructor creates empty factor.
const DiscreteKeys & discreteKeys() const
Return the discrete keys for this factor.
Definition HybridFactor.h:131
Implementation of a discrete-conditioned hybrid factor.
Definition HybridGaussianFactor.h:60
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
Definition HybridGaussianFactor.cpp:135
AlgebraicDecisionTree< Key > errorTree(const VectorValues &continuousValues) const override
Compute error of the HybridGaussianFactor as a tree.
Definition HybridGaussianFactor.cpp:187
const FactorValuePairs & factors() const
Getter for GaussianFactor decision tree.
Definition HybridGaussianFactor.h:150
double error(const HybridValues &hybridValues) const override
Compute the log-likelihood, including the log-normalizing constant.
Definition HybridGaussianFactor.cpp:197
HybridGaussianFactor()=default
Default constructor, mainly for serialization.
DecisionTree< Key, GaussianFactorValuePair > FactorValuePairs
typedef for Decision Tree of Gaussian factors and arbitrary value.
Definition HybridGaussianFactor.h:69
GaussianFactorValuePair operator()(const DiscreteValues &assignment) const
Get factor at a given discrete assignment.
Definition HybridGaussianFactor.cpp:161
bool equals(const HybridFactor &lf, double tol=1e-9) const override
equals
Definition HybridGaussianFactor.cpp:116
Alias for DecisionTree of GaussianFactorGraphs and their scalar sums.
Definition HybridGaussianProductFactor.h:35
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:37
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:73