29 :
Constraint(dkey.first), cardinality_(dkey.second) {
30 for (
size_t v = 0;
v < cardinality_;
v++) values_.insert(
v);
36 :
Constraint(dkey.first), cardinality_(dkey.second) {
52 size_t nrValues()
const {
return values_.size(); }
64 if (!dynamic_cast<const Domain*>(&other))
67 const Domain&
f(static_cast<const Domain&>(other));
74 std::string base1Str()
const;
95 bool ensureArcConsistency(
Key j,
Domains* domains)
const override;
void print(const Matrix &A, const string &s, ostream &stream)
const gtsam::Symbol key('X', 0)
std::shared_ptr< Constraint > shared_ptr
Point2 operator*(double s, const Point2 &p)
multiply with scalar
size_t firstValue() const
Key key() const
The one key.
static const KeyFormatter DefaultKeyFormatter
const KeyFormatter & formatter
bool equals(const DiscreteFactor &other, double tol) const override
equals
DiscreteKey discreteKey() const
std::map< Key, Domain > Domains
std::set< size_t > values_
Cardinality.
Array< int, Dynamic, 1 > v
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Domain(const DiscreteKey &dkey)
specialized key for discrete variables
bool contains(size_t value) const
std::pair< Key, size_t > DiscreteKey
std::shared_ptr< Domain > shared_ptr
allowed values
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
Domain(const DiscreteKey &dkey, size_t v)
std::uint64_t Key
Integer nonlinear key type.
void insert(size_t value)
Insert a value, non const :-(.
void erase(size_t value)
Erase a value, non const :-(.