22#include <boost/optional.hpp>
57 typedef std::vector<double>
Row;
58 typedef std::vector<Row> Table;
69 boost::optional<std::string> spec_;
72 boost::optional<Table> table_;
96 const boost::optional<Table>& table()
const {
101 std::vector<double> cpt()
const;
107 Signature& operator=(
const std::string& spec);
110 Signature& operator=(
const Table& table);
113 GTSAM_EXPORT
friend std::ostream& operator <<(std::ostream &os,
const Signature &s);
specialized key for discrete variables
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:86
Signature operator|(const DiscreteKey &key, const DiscreteKey &parent)
Helper function to create Signature objects example: Signature s = D | E;.
Definition: Signature.cpp:208
Signature operator%(const DiscreteKey &key, const string &parent)
Helper function to create Signature objects example: Signature s(D % "99/1"); Uses string parser,...
Definition: Signature.cpp:213
std::pair< Key, size_t > DiscreteKey
Key type for discrete conditionals Includes name and cardinality.
Definition: DiscreteKey.h:34
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition: DiscreteKey.h:37
Signature for a discrete conditional density, used to construct conditionals.
Definition: Signature.h:52
std::vector< double > Row
Data type for the CPT.
Definition: Signature.h:57
const DiscreteKey & key() const
the variable key
Definition: Signature.h:80
const DiscreteKeys & parents() const
the parent keys
Definition: Signature.h:85