22 #include <gtsam_unstable/dllexport.h> 50 template <
class KeyIterator>
74 virtual bool ensureArcConsistency(
Key j,
Domains* domains)
const = 0;
77 virtual shared_ptr partiallyApply(
const DiscreteValues&)
const = 0;
80 virtual shared_ptr partiallyApply(
const Domains&)
const = 0;
88 return "`Constraint` on " + std::to_string(
size()) +
" variables\n";
94 return "<p>Constraint on " + std::to_string(
size()) +
" variables</p>";
std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const override
Render as html table.
std::shared_ptr< Constraint > shared_ptr
static const KeyFormatter DefaultKeyFormatter
~Constraint() override
Virtual destructor.
Constraint(Key j)
Construct unary constraint factor.
std::map< Key, Domain > Domains
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
DiscreteValues::Names Names
Translation table from values to strings.
std::string markdown(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const override
Render as markdown table.
Constraint(const KeyVector &js)
Construct n-way constraint factor.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Constraint(KeyIterator beginKey, KeyIterator endKey)
construct from container
std::uint64_t Key
Integer nonlinear key type.
Constraint(Key j1, Key j2)
Construct binary constraint factor.