10 #include <gtsam_unstable/discrete/BinaryAllDiff.h> 24 std::map<Key,size_t> cardinalities_;
37 virtual void print(
const std::string& s =
"",
38 const KeyFormatter& formatter = DefaultKeyFormatter)
const;
42 if(!dynamic_cast<const AllDiff*>(&other))
45 const AllDiff& f(static_cast<const AllDiff&>(other));
46 return cardinalities_.size() == f.cardinalities_.size()
47 &&
std::equal(cardinalities_.begin(), cardinalities_.end(),
48 f.cardinalities_.begin());
53 virtual double operator()(
const Values& values)
const;
68 bool ensureArcConsistency(
size_t j, std::vector<Domain>& domains)
const;
71 virtual Constraint::shared_ptr partiallyApply(
const Values&)
const;
74 virtual Constraint::shared_ptr partiallyApply(
const std::vector<Domain>&)
const;
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:70
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
Definition: Constraint.h:32
specialized key for discrete variables
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
Definition: DiscreteFactor.h:34
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:33
A discrete probabilistic factor.
Definition: DecisionTreeFactor.h:38
std::pair< Key, size_t > DiscreteKey
Key type for discrete conditionals Includes name and cardinality.
Definition: DiscreteKey.h:34
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
bool equal(const T &obj1, const T &obj2, double tol)
Call equal on the object.
Definition: Testable.h:83
General AllDiff constraint Returns 1 if values for all keys are different, 0 otherwise DiscreteFactor...
Definition: AllDiff.h:22
bool equals(const DiscreteFactor &other, double tol) const
equals
Definition: AllDiff.h:41
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition: DiscreteKey.h:37
Point2 operator *(double s, const Point2 &p)
multiply with scalar
Definition: Point2.h:170