49 return (i_ + h.
i_) %
N;
53 return (
N + i_ - h.
i_) %
N;
60 void print(
const std::string&
s =
"")
const {
61 std::cout <<
s << i_ << std::endl;
65 return other.
i_ ==
i_;
Concept check for values that can be used in unit tests.
Concept check class for variable types with Group properties.
Cyclic operator+(const Cyclic &h) const
Addition modulo N.
Cyclic operator-(const Cyclic &h) const
Subtraction modulo N.
void print(const std::string &s="") const
print with optional string
Cyclic operator-() const
Inverse.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Cyclic(size_t i)
Constructor.
size_t i_
we just use an unsigned int
Cyclic()
Default constructor yields identity.
bool equals(const Cyclic &other, double tol=1e-9) const
equals with an tolerance, prints out message if unequal