Go to the documentation of this file.
21 for (
size_t v : values_) cout <<
" " <<
v;
28 for (
size_t v : values_)
ss <<
v + 1;
41 for (
size_t i1 = 0;
i1 < cardinality_; ++
i1)
table.push_back(contains(
i1));
49 return toDecisionTreeFactor() *
f;
54 if (
j !=
key())
throw invalid_argument(
"Domain check on wrong domain");
56 for (
size_t value : values_)
57 if (!
D.contains(
value))
throw runtime_error(
"Unsatisfiable");
67 for (
const size_t value : values_) {
71 if (k !=
j && domains.at(k).contains(
value))
goto found;
82 if (it !=
values.
end() && !contains(it->second))
83 throw runtime_error(
"Domain::partiallyApply: unsatisfiable");
84 return std::make_shared<Domain>(*
this);
91 throw runtime_error(
"Domain::partiallyApply: unsatisfiable");
92 return std::make_shared<Domain>(Dk);
Concept check for values that can be used in unit tests.
std::string base1Str() const
const KeyFormatter & formatter
DiscreteKeys is a set of keys that can be assembled using the & operator.
const_iterator begin() const
Constraint::shared_ptr partiallyApply(const DiscreteValues &values) const override
Partially apply known values.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
static std::stringstream ss
double operator()(const DiscreteValues &values) const override
Calculate value.
const ValueType at(Key j) const
deref_iterator end() const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
DecisionTreeFactor operator*(const DecisionTreeFactor &f) const override
Multiply into a decisiontree.
bool ensureArcConsistency(Key j, Domains *domains) const override
std::map< Key, Domain > Domains
std::optional< Domain > checkAllDiff(const KeyVector keys, const Domains &domains) const
const gtsam::Symbol key('X', 0)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
std::pair< Key, size_t > DiscreteKey
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
Array< int, Dynamic, 1 > v
DecisionTreeFactor toDecisionTreeFactor() const override
Convert into a decisiontree.
std::shared_ptr< Constraint > shared_ptr
std::uint64_t Key
Integer nonlinear key type.
deref_iterator find(Key j) const
gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:00:48