28 class DecisionTreeFactor;
29 class DiscreteConditional;
59 template<
typename CONTAINER>
71 const std::string& s =
"DiscreteFactor\n",
72 const KeyFormatter& formatter = DefaultKeyFormatter)
const override {
113 const Names& names = {})
const = 0;
122 virtual std::string
html(
124 const Names& names = {})
const = 0;
150 std::vector<double>
expNormalize(
const std::vector<double> &logProbs);
void print(const std::string &s="DiscreteFactor\, const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
Definition: DiscreteFactor.h:70
Definition: HybridValues.h:38
std::string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
Free version of markdown.
Concept check for values that can be used in unit tests.
Definition: Testable.h:152
Definition: DecisionTreeFactor.h:44
Point2 operator*(double s, const Point2 &p)
multiply with scalar
Definition: Point2.h:52
DiscreteFactor This
This class.
Definition: DiscreteFactor.h:43
Definition: Testable.h:112
DiscreteFactor()
Definition: DiscreteFactor.h:55
GTSAM_EXPORT void print(const Matrix &A, const std::string &s, std::ostream &stream)
Definition: DiscreteValues.h:34
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::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
Definition: DiscreteFactor.h:44
DiscreteValues::Names Names
Translation table from values to strings.
Definition: DiscreteFactor.h:102
Definition: chartTesting.h:28
Definition: DiscreteFactor.h:38
Factor Base
Our base class.
Definition: DiscreteFactor.h:45
std::string html(const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
Free version of html.
std::vector< double > expNormalize(const std::vector< double > &logProbs)
Normalize a set of log probabilities.
DiscreteFactor(const CONTAINER &keys)
Definition: DiscreteFactor.h:60
std::map< Key, std::vector< std::string > > Names
Translation table from values to strings.
Definition: DiscreteValues.h:95
The base class for all factors.