Go to the documentation of this file.
   23   std::cout << 
s << 
"AllDiff on ";
 
   25   std::cout << std::endl;
 
   30   std::set<size_t> taken;  
 
   33     if (taken.count(
value)) 
return 0.0;  
 
   46     for (
size_t i2 = 
i1 + 1; i2 < 
nrKeys; i2++) {
 
   78       const Domain& Dk = domains->at(
k);
 
   98   return std::make_shared<AllDiff>(newKeys);
 
  103     const Domains& domains)
 const {
 
  106     const Domain& Dk = domains.at(
k);
 
  
std::map< Key, size_t > cardinalities_
bool contains(size_t value) const
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
Concept check for values that can be used in unit tests.
DecisionTreeFactor toDecisionTreeFactor() const override
Convert into a decisiontree.
static const size_t nrKeys
const KeyFormatter & formatter
DiscreteKeys is a set of keys that can be assembled using the & operator.
bool ensureArcConsistency(Key j, Domains *domains) const override
void erase(size_t value)
Erase a value, non const :-(.
double evaluate(const Assignment< Key > &values) const override
Calculate value = expensive !
DiscreteKey discreteKey(size_t i) const
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::optional< Domain > checkAllDiff(const KeyVector keys, const Domains &domains) const
Constraint::shared_ptr partiallyApply(const DiscreteValues &) const override
Partially apply known values.
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
DecisionTreeFactor toDecisionTreeFactor() const override
Convert into a decisiontree, can be very expensive !
KeyVector keys_
The keys involved in this factor.
std::pair< Key, size_t > DiscreteKey
AllDiff(const DiscreteKeys &dkeys)
Construct from keys.
DecisionTreeFactor operator*(const DecisionTreeFactor &f) const override
Multiply into a decisiontree.
size_t firstValue() const
std::shared_ptr< Constraint > shared_ptr
std::uint64_t Key
Integer nonlinear key type.
static constexpr double k
gtsam
Author(s): 
autogenerated on Wed May 28 2025 03:00:48