36 Constraint(key), cardinality_(n), value_(value) {
45 void print(
const std::string&
s =
"",
50 if(!dynamic_cast<const SingleValue*>(&other))
53 const SingleValue&
f(static_cast<const SingleValue&>(other));
72 bool ensureArcConsistency(
size_t j, std::vector<Domain>& domains)
const override;
79 const std::vector<Domain>& domains)
const override;
void print(const Matrix &A, const string &s, ostream &stream)
size_t value_
allowed value
SingleValue(Key key, size_t n, size_t value)
Constructor.
Point2 operator*(double s, const Point2 &p)
multiply with scalar
static const KeyFormatter DefaultKeyFormatter
const KeyFormatter & formatter
DiscreteKey discreteKey() const
constexpr int first(int i)
Implementation details for constexpr functions.
size_t cardinality_
Number of values.
std::pair< Key, size_t > DiscreteKey
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
specialized key for discrete variables
bool equals(const DiscreteFactor &other, double tol) const override
equals
SingleValue(const DiscreteKey &dkey, size_t value)
Constructor.
std::uint64_t Key
Integer nonlinear key type.
boost::shared_ptr< SingleValue > shared_ptr
boost::shared_ptr< Constraint > shared_ptr