Go to the documentation of this file.
22 for (
auto entry : index) {
24 const Key key = entry.first;
28 if (domains->at(
key).isSingleton())
continue;
33 auto constraint = std::dynamic_pointer_cast<Constraint>((*
this)[
f]);
35 changed = constraint->ensureArcConsistency(
key, domains) || changed;
44 Domains CSP::runArcConsistency(
size_t cardinality,
size_t maxIterations)
const {
50 for (
auto entry : index) {
51 const Key key = entry.first;
56 for (
size_t it = 0; it < maxIterations; it++) {
57 bool changed = runArcConsistency(index, &domains);
72 for (
auto key_domain : domains) {
78 auto constraint = std::dynamic_pointer_cast<Constraint>(
f);
80 throw runtime_error(
"CSP:runArcConsistency: non-constraint factor");
82 if (reduced->size() > 1) {
Concept check for values that can be used in unit tests.
const GaussianFactorGraph factors
std::map< Key, Domain > Domains
const gtsam::Symbol key('X', 0)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
std::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
std::pair< Key, size_t > DiscreteKey
std::shared_ptr< Constraint > shared_ptr
std::uint64_t Key
Integer nonlinear key type.
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
FastVector< FactorIndex > FactorIndices
Define collection types:
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:18