Go to the documentation of this file.
29 class DecisionTreeFactor;
30 class DiscreteConditional;
43 typedef std::shared_ptr<DiscreteFactor>
65 template <
typename CONTAINER>
67 const std::map<Key, size_t> cardinalities = {})
68 :
Base(
keys), cardinalities_(cardinalities) {}
79 const std::string&
s =
"DiscreteFactor\n",
141 virtual std::string
html(
143 const Names&
names = {})
const = 0;
148 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
150 friend class boost::serialization::access;
151 template <
class ARCHIVE>
152 void serialize(ARCHIVE& ar,
const unsigned int ) {
153 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
154 ar& BOOST_SERIALIZATION_NVP(cardinalities_);
180 std::vector<double>
expNormalize(
const std::vector<double>& logProbs);
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of markdown.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::map< Key, size_t > cardinalities() const
Concept check for values that can be used in unit tests.
std::map< Key, size_t > cardinalities_
Map of Keys and their cardinalities.
const KeyFormatter & formatter
DiscreteKeys is a set of keys that can be assembled using the & operator.
The base class for all factors.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Point2 operator*(double s, const Point2 &p)
multiply with scalar
Algebraic Decision Trees.
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
void print(const std::string &s="DiscreteFactor\n", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
DiscreteFactor This
This class.
DiscreteFactor(const CONTAINER &keys, const std::map< Key, size_t > cardinalities={})
size_t cardinality(Key j) const
std::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
DiscreteValues::Names Names
Translation table from values to strings.
std::vector< double > expNormalize(const std::vector< double > &logProbs)
Normalize a set of log probabilities.
Factor Base
Our base class.
string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of html.
std::map< Key, std::vector< std::string > > Names
Translation table from values to strings.
std::uint64_t Key
Integer nonlinear key type.
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:26