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_;
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
Subtraction modulo N.
bool equals(const Cyclic &other, double tol=1e-9) const
equals with an tolerance, prints out message if unequal
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 operator-() const
Inverse.
void print(const std::string &s="") const
print with optional string
Cyclic()
Default constructor yields identity.
Cyclic operator+(const Cyclic &h) const
Addition modulo N.