16 template<
int64_t N,
typename T =
int64_t>
19 constexpr
static int64_t
order = N;
25 explicit operator char()
const;
26 explicit operator short()
const;
27 explicit operator int()
const;
28 explicit operator int64_t()
const;
29 explicit operator unsigned char()
const;
30 explicit operator unsigned short()
const;
31 explicit operator unsigned int()
const;
32 explicit operator uint64_t()
const;
45 template<
int64_t N,
typename T>
48 template<
int64_t N,
typename T>
51 template<
int64_t N,
typename T>
58 template<
int64_t N,
typename T>
70 template<
int64_t N,
typename T>
71 struct NumTraits<
Z_mod<N, T>>
80 RequireInitialization = 0,
86 static inline int digits10() {
return 0; }
90 #include "impl/Z_n.ipp"
Contains all the SFINAE tricks.
The class of Z/N coefficients where N is prime.
Definition: Z_n.hpp:17
Z_mod< N, T > operator-(Z_mod< N, T > b) const
Z_mod()
Default value 0.
Definition: Z_n.hpp:21
Z_mod< N, T > & operator-=(Z_mod< N, T > b)
constexpr static int64_t order
The N of Z/N.
Definition: Z_n.hpp:19
Z_mod< N, T > operator+(Z_mod< N, T > b) const
Z_mod(bool x)
Initialize from 0,1.
Definition: Z_n.hpp:22
Z_mod(int x)
Initialize from int.
Z_mod< N, T > & operator+=(Z_mod< N, T > b)
Z_mod(int64_t x)
Initialize from 64bit int.
bool operator!=(Z_mod< N, T > a) const
bool operator==(Z_mod< N, T > a) const
T x
A modulo N number.
Definition: Z_n.hpp:20
Z_mod< N, T > & operator/=(Z_mod< N, T > b)
bool operator<=(Z_mod< N, T > a) const
Needed for Eigen pruning; standard order on 0,...,N-1.
Z_mod< N, T > & operator*=(Z_mod< N, T > b)
Everything in this library is under this namespace.
Definition: Box.hpp:9
std::ostream & operator<<(std::ostream &, const Chains< rank_t, diff_t > &)
Prints chain complex.
Z_mod< N, T > operator-(Z_mod< N, T > a)
T abs(T a)
The usual absolute value for integer and Z/N types.
Z_mod< N, T > operator*(Z_mod< N, T > a, Z_mod< N, T > b)
Z_mod< N, T > operator/(Z_mod< N, T > a, Z_mod< N, T > b)