additional Signature based constructor for DecisionTreeFactor
parent
05d8030af4
commit
834288f974
|
@ -18,6 +18,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <gtsam/discrete/Signature.h>
|
||||
#include <gtsam/discrete/AlgebraicDecisionTree.h>
|
||||
#include <gtsam/discrete/DiscreteFactor.h>
|
||||
#include <gtsam/discrete/DiscreteKey.h>
|
||||
|
@ -116,6 +117,10 @@ namespace gtsam {
|
|||
DecisionTreeFactor(const DiscreteKey& key, const std::vector<double>& row)
|
||||
: DecisionTreeFactor(DiscreteKeys{key}, row) {}
|
||||
|
||||
/// Construct from Signature
|
||||
DecisionTreeFactor(const Signature& signature)
|
||||
: DecisionTreeFactor(signature.discreteKeys(), signature.cpt()) {}
|
||||
|
||||
/** Construct from a DiscreteConditional type */
|
||||
explicit DecisionTreeFactor(const DiscreteConditional& c);
|
||||
|
||||
|
|
Loading…
Reference in New Issue