40 operator size_t()
const {
45 return (i_ + h.i_) % N;
49 return (N + i_ - h.i_) % N;
56 void print(
const std::string& s =
"")
const {
57 std::cout << s << i_ << std::endl;
61 return other.i_ == i_;
67 struct traits<
Cyclic<N> > : internal::AdditiveGroupTraits<Cyclic<N> >,
Cyclic operator-() const
Inverse.
Definition: Cyclic.h:52
Cyclic operator+(const Cyclic &h) const
Addition modulo N.
Definition: Cyclic.h:44
Cyclic(size_t i)
Constructor.
Definition: Cyclic.h:30
Cyclic()
Default constructor yields identity.
Definition: Cyclic.h:35
Concept check class for variable types with Group properties.
void print(const std::string &s="") const
print with optional string
Definition: Cyclic.h:56
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
Cyclic operator-(const Cyclic &h) const
Subtraction modulo N.
Definition: Cyclic.h:48
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Cyclic group of order N.
Definition: Cyclic.h:26
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Concept check for values that can be used in unit tests.
bool equals(const Cyclic &other, double tol=1e-9) const
equals with an tolerance, prints out message if unequal
Definition: Cyclic.h:60