32 :
Constraint(key), cardinality_(n), value_(value) {}
36 :
Constraint(dkey.first), cardinality_(dkey.second), value_(value) {}
44 if (!dynamic_cast<const SingleValue*>(&other))
47 const SingleValue&
f(static_cast<const SingleValue&>(other));
67 bool ensureArcConsistency(
Key j,
Domains* domains)
const override;
74 const Domains& domains)
const override;
void print(const Matrix &A, const string &s, ostream &stream)
const gtsam::Symbol key('X', 0)
size_t value_
< Number of values
std::shared_ptr< Constraint > shared_ptr
SingleValue(Key key, size_t n, size_t value)
Construct from key, cardinality, and given value.
Point2 operator*(double s, const Point2 &p)
multiply with scalar
static const KeyFormatter DefaultKeyFormatter
const KeyFormatter & formatter
std::map< Key, Domain > Domains
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.
specialized key for discrete variables
std::pair< Key, size_t > DiscreteKey
DiscreteKey discreteKey() const
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
bool equals(const DiscreteFactor &other, double tol) const override
equals
SingleValue(const DiscreteKey &dkey, size_t value)
Construct from DiscreteKey and given value.
std::uint64_t Key
Integer nonlinear key type.
std::shared_ptr< SingleValue > shared_ptr