|
| SingleValue (Key key, size_t n, size_t value) |
| Construct from key, cardinality, and given value.
|
|
| SingleValue (const DiscreteKey &dkey, size_t value) |
| Construct from DiscreteKey and given value.
|
|
void | print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| print
|
|
bool | equals (const DiscreteFactor &other, double tol) const override |
| equals
|
|
double | operator() (const DiscreteValues &values) const override |
| Calculate value.
|
|
DecisionTreeFactor | toDecisionTreeFactor () const override |
| Convert into a decisiontree.
|
|
DecisionTreeFactor | operator* (const DecisionTreeFactor &f) const override |
| Multiply into a decisiontree.
|
|
bool | ensureArcConsistency (Key j, Domains *domains) const override |
|
Constraint::shared_ptr | partiallyApply (const DiscreteValues &values) const override |
| Partially apply known values.
|
|
Constraint::shared_ptr | partiallyApply (const Domains &domains) const override |
| Partially apply known values, domain version.
|
|
|
std::string | markdown (const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const override |
| Render as markdown table.
|
|
std::string | html (const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const override |
| Render as html table.
|
|
|
bool | equals (const This &other, double tol=1e-9) const |
| check equality
|
|
virtual void | printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| print only keys
|
|
|
double | error (const DiscreteValues &values) const |
| Error is just -log(value)
|
|
double | error (const HybridValues &c) const override |
|
|
bool | empty () const |
| Whether the factor is empty (involves zero variables).
|
|
Key | front () const |
| First key.
|
|
Key | back () const |
| Last key.
|
|
const_iterator | find (Key key) const |
| find
|
|
const KeyVector & | keys () const |
| Access the factor's involved variable keys.
|
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
size_t | size () const |
|
|
KeyVector & | keys () |
|
iterator | begin () |
|
iterator | end () |
|
SingleValue constraint: ensures a variable takes on a certain value. This could of course also be implemented by changing its Domain
.