Go to the documentation of this file.
39 public Conditional<DecisionTreeFactor, DiscreteConditional> {
64 const ADT& potentials);
88 const std::vector<double>&
table)
102 const std::string& spec)
113 DiscreteConditional(
const DecisionTreeFactor& joint,
114 const DecisionTreeFactor& marginal);
121 DiscreteConditional(
const DecisionTreeFactor& joint,
122 const DecisionTreeFactor& marginal,
123 const Ordering& orderedKeys);
140 DiscreteConditional
operator*(
const DiscreteConditional&
other)
const;
143 DiscreteConditional marginal(
Key key)
const;
151 const std::string&
s =
"Discrete Conditional: ",
166 const std::string&
s =
"Discrete Conditional: ",
177 using DecisionTreeFactor::operator();
209 size_t sample(
size_t parent_value)
const;
212 size_t sample()
const;
229 std::vector<DiscreteValues> frontalAssignments()
const;
232 std::vector<DiscreteValues> allAssignments()
const;
240 const Names&
names = {})
const override;
244 const Names&
names = {})
const override;
256 using BaseConditional::operator();
272 double negLogConstant()
const override;
279 bool forceComplete)
const;
282 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
284 friend class boost::serialization::access;
285 template <
class Archive>
286 void serialize(Archive& ar,
const unsigned int ) {
287 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseFactor);
288 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseConditional);
DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const std::vector< double > &table)
double logProbability(const DiscreteValues &x) const
Log-probability is just -error(x).
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.)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const Signature::Table &table)
const KeyFormatter & formatter
double error(const DiscreteValues &values) const override
Calculate error for DiscreteValues x, is -log(probability).
DiscreteKeys is a set of keys that can be assembled using the & operator.
std::shared_ptr< DecisionTreeFactor > shared_ptr
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Point2 operator*(double s, const Point2 &p)
multiply with scalar
Conditional< BaseFactor, This > BaseConditional
Typedef to our conditional base class.
void print(const Matrix &A, const string &s, ostream &stream)
AlgebraicDecisionTree< Key > ADT
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.
signatures for conditional densities
DiscreteConditional This
Typedef to this class.
const gtsam::Symbol key('X', 0)
std::shared_ptr< This > shared_ptr
shared_ptr to this class
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
double evaluate(const DiscreteValues &values) const
Evaluate, just look up in AlgebraicDecisionTree.
double logProbability(const HybridValues &x) const override
< HybridValues version
void printSignature(const std::string &s="Discrete Conditional: ", const KeyFormatter &formatter=DefaultKeyFormatter) const
print index signature only
std::pair< Key, size_t > DiscreteKey
DiscreteConditional(const DiscreteKey &key, const std::string &spec)
No-parent specialization; can also use DiscreteDistribution.
DiscreteConditional()
Default constructor needed for serialization.
string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of html.
DecisionTreeFactor BaseFactor
Typedef to our factor base class.
std::uint64_t Key
Integer nonlinear key type.
DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const std::string &spec)
static const T & choose(int layout, const T &col, const T &row)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:13