Go to the documentation of this file.
22 #include <gtsam_unstable/dllexport.h>
50 template <
class KeyIterator>
75 virtual bool ensureArcConsistency(
Key j,
Domains* domains)
const = 0;
78 virtual shared_ptr partiallyApply(
const DiscreteValues&)
const = 0;
81 virtual shared_ptr partiallyApply(
const Domains&)
const = 0;
86 return std::make_shared<DecisionTreeFactor>(
87 this->
operator*(df->toDecisionTreeFactor()));
93 return this->toDecisionTreeFactor() / df;
100 return toDecisionTreeFactor().sum(nrFrontals);
104 return toDecisionTreeFactor().sum(
keys);
108 return toDecisionTreeFactor().max(nrFrontals);
112 return toDecisionTreeFactor().max(
keys);
122 return "`Constraint` on " + std::to_string(
size()) +
" variables\n";
128 return "<p>Constraint on " + std::to_string(
size()) +
" variables</p>";
DiscreteFactor::shared_ptr max(const Ordering &keys) const override
Create new factor by maximizing over all values with the same separator.
DiscreteFactor::shared_ptr max(size_t nrFrontals) const override
Create new factor by maximizing over all values with the same separator.
DiscreteFactor::shared_ptr multiply(const DiscreteFactor::shared_ptr &df) const override
Multiply factors, DiscreteFactor::shared_ptr edition.
DiscreteFactor::shared_ptr operator/(const DiscreteFactor::shared_ptr &df) const override
divide by DiscreteFactor::shared_ptr f (safely)
Constraint(KeyIterator beginKey, KeyIterator endKey)
construct from container
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.
DiscreteFactor::shared_ptr sum(const Ordering &keys) const override
Create new factor by summing all values with the same separator values.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Constraint(const KeyVector &js)
Construct n-way constraint factor.
uint64_t nrValues() const override
Get the number of non-zero values contained in this factor.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
std::map< Key, Domain > Domains
std::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
DiscreteValues::Names Names
Translation table from values to strings.
Constraint(Key j1, Key j2)
Construct binary constraint factor.
unsigned __int64 uint64_t
DiscreteFactor::shared_ptr sum(size_t nrFrontals) const override
Create new factor by summing all values with the same separator values.
std::shared_ptr< Constraint > shared_ptr
std::uint64_t Key
Integer nonlinear key type.
~Constraint() override
Virtual destructor.
Constraint(Key j)
Construct unary constraint factor.
gtsam
Author(s):
autogenerated on Tue Jan 7 2025 04:02:00