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: ",
172 using BaseFactor::evaluate;
173 using BaseFactor::operator();
205 size_t sample(
size_t parent_value)
const;
208 size_t sample()
const;
225 std::vector<DiscreteValues> frontalAssignments()
const;
228 std::vector<DiscreteValues> allAssignments()
const;
236 const Names&
names = {})
const override;
240 const Names&
names = {})
const override;
252 using BaseConditional::operator();
268 double negLogConstant()
const override;
275 bool forceComplete)
const;
278 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
280 friend class boost::serialization::access;
281 template <
class Archive>
282 void serialize(Archive& ar,
const unsigned int ) {
283 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseFactor);
284 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
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
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 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 Thu Dec 19 2024 04:01:03