|
void | addAllDiff (const DiscreteKey &key1, const DiscreteKey &key2) |
| Add a binary AllDiff constraint. More...
|
|
void | addAllDiff (const DiscreteKeys &dkeys) |
| Add a general AllDiff constraint. More...
|
|
void | addSingleValue (const DiscreteKey &dkey, size_t value) |
| Add a unary constraint, allowing only a single value. More...
|
|
CSP | partiallyApply (const Domains &domains) const |
|
Domains | runArcConsistency (size_t cardinality, size_t maxIterations=10) const |
|
bool | runArcConsistency (const VariableIndex &index, Domains *domains) const |
| Run arc consistency for all variables, return true if any domain changed. More...
|
|
template<typename... Args> |
void | add (Args &&... args) |
|
| DiscreteFactorGraph () |
|
map from keys to values
More...
|
|
template<typename ITERATOR > |
| DiscreteFactorGraph (ITERATOR firstFactor, ITERATOR lastFactor) |
|
template<class CONTAINER > |
| DiscreteFactorGraph (const CONTAINER &factors) |
|
template<class DERIVEDFACTOR > |
| DiscreteFactorGraph (const FactorGraph< DERIVEDFACTOR > &graph) |
|
DiscreteKeys | discreteKeys () const |
| Return the DiscreteKeys in this factor graph. More...
|
|
KeySet | keys () const |
|
DiscreteLookupDAG | maxProduct (OptionalOrderingType orderingType={}) const |
| Implement the max-product algorithm. More...
|
|
DiscreteLookupDAG | maxProduct (const Ordering &ordering) const |
| Implement the max-product algorithm. More...
|
|
double | operator() (const DiscreteValues &values) const |
|
DiscreteValues | optimize (OptionalOrderingType orderingType={}) const |
| Find the maximum probable explanation (MPE) by doing max-product. More...
|
|
DiscreteValues | optimize (const Ordering &ordering) const |
| Find the maximum probable explanation (MPE) by doing max-product. More...
|
|
void | print (const std::string &s="DiscreteFactorGraph", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| print More...
|
|
DecisionTreeFactor | product () const |
|
DiscreteBayesNet | sumProduct (OptionalOrderingType orderingType={}) const |
| Implement the sum-product algorithm. More...
|
|
DiscreteBayesNet | sumProduct (const Ordering &ordering) const |
| Implement the sum-product algorithm. More...
|
|
bool | equals (const This &fg, double tol=1e-9) const |
|
std::string | markdown (const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteFactor::Names &names={}) const |
| Render as markdown tables. More...
|
|
std::string | html (const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteFactor::Names &names={}) const |
| Render as html tables. More...
|
|
| FactorGraph (std::initializer_list< std::shared_ptr< DERIVEDFACTOR >> sharedFactors) |
|
virtual | ~FactorGraph ()=default |
|
void | reserve (size_t size) |
|
IsDerived< DERIVEDFACTOR > | push_back (std::shared_ptr< DERIVEDFACTOR > factor) |
| Add a factor directly using a shared_ptr. More...
|
|
IsDerived< DERIVEDFACTOR > | push_back (const DERIVEDFACTOR &factor) |
|
IsDerived< DERIVEDFACTOR > | emplace_shared (Args &&... args) |
| Emplace a shared pointer to factor of given type. More...
|
|
IsDerived< DERIVEDFACTOR > | add (std::shared_ptr< DERIVEDFACTOR > factor) |
| add is a synonym for push_back. More...
|
|
HasDerivedElementType< ITERATOR > | push_back (ITERATOR firstFactor, ITERATOR lastFactor) |
|
HasDerivedValueType< ITERATOR > | push_back (ITERATOR firstFactor, ITERATOR lastFactor) |
| Push back many factors with an iterator (factors are copied) More...
|
|
HasDerivedElementType< CONTAINER > | push_back (const CONTAINER &container) |
|
HasDerivedValueType< CONTAINER > | push_back (const CONTAINER &container) |
| Push back non-pointer objects in a container (factors are copied). More...
|
|
void | add (const FACTOR_OR_CONTAINER &factorOrContainer) |
|
std::enable_if< std::is_base_of< This, typename CLIQUE::FactorGraphType >::value >::type | push_back (const BayesTree< CLIQUE > &bayesTree) |
|
FactorIndices | add_factors (const CONTAINER &factors, bool useEmptySlots=false) |
|
bool | equals (const This &fg, double tol=1e-9) const |
| Check equality up to tolerance. More...
|
|
size_t | size () const |
|
bool | empty () const |
|
const sharedFactor | at (size_t i) const |
|
sharedFactor & | at (size_t i) |
|
const sharedFactor | operator[] (size_t i) const |
|
sharedFactor & | operator[] (size_t i) |
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
sharedFactor | front () const |
|
sharedFactor | back () const |
|
double | error (const HybridValues &values) const |
|
iterator | begin () |
|
iterator | end () |
|
virtual void | resize (size_t size) |
|
void | remove (size_t i) |
|
void | replace (size_t index, sharedFactor factor) |
|
iterator | erase (iterator item) |
|
iterator | erase (iterator first, iterator last) |
|
void | dot (std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const |
| Output to graphviz format, stream version. More...
|
|
std::string | dot (const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const |
| Output to graphviz format string. More...
|
|
void | saveGraph (const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const |
| output to file with graphviz format. More...
|
|
size_t | nrFactors () const |
|
KeySet | keys () const |
|
KeyVector | keyVector () const |
|
bool | exists (size_t idx) const |
|
std::shared_ptr< BayesTreeType > | eliminateMultifrontal (OptionalOrderingType orderingType={}, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesTreeType > | eliminateMultifrontal (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::pair< std::shared_ptr< BayesTreeType >, std::shared_ptr< FactorGraphType > > | eliminatePartialMultifrontal (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::pair< std::shared_ptr< BayesTreeType >, std::shared_ptr< FactorGraphType > > | eliminatePartialMultifrontal (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::pair< std::shared_ptr< BayesNetType >, std::shared_ptr< FactorGraphType > > | eliminatePartialSequential (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::pair< std::shared_ptr< BayesNetType >, std::shared_ptr< FactorGraphType > > | eliminatePartialSequential (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesNetType > | eliminateSequential (OptionalOrderingType orderingType={}, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesNetType > | eliminateSequential (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< FactorGraphType > | marginal (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesNetType > | marginalMultifrontalBayesNet (const Ordering &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesNetType > | marginalMultifrontalBayesNet (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesNetType > | marginalMultifrontalBayesNet (const Ordering &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesNetType > | marginalMultifrontalBayesNet (const KeyVector &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesTreeType > | marginalMultifrontalBayesTree (const Ordering &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesTreeType > | marginalMultifrontalBayesTree (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesTreeType > | marginalMultifrontalBayesTree (const Ordering &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
std::shared_ptr< BayesTreeType > | marginalMultifrontalBayesTree (const KeyVector &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const |
|
Constraint Satisfaction Problem class A specialization of a DiscreteFactorGraph. It knows about CSP-specific constraints and algorithms
Definition at line 21 of file CSP.h.