Modulo

Functions

template<class T>
inline Modulo<T> operator+(const Modulo<T> a, const Modulo<T> b)
template<class T>
inline Modulo<T> operator-(const Modulo<T> a, const Modulo<T> b)
template<class T>
inline Modulo<T> operator*(const Modulo<T> a, const Modulo<T> b)
template<class T>
inline Modulo<T> operator/(const Modulo<T> a, const Modulo<T> b)
template<class T>
inline std::ostream &operator<<(std::ostream &os, const Modulo<T> x)
template<class T>
class Modulo

Public Functions

inline Modulo(const T val = T())
inline T val() const
inline operator T() const
inline Modulo<T> inverse() const
inline void operator+=(const Modulo<T> x)
inline void operator-=(const Modulo<T> x)

Public Static Functions

static inline T mod()
static inline void setMod(const int mod)

Private Members

T m_val

Private Static Attributes

static T s_mod = 1
template<class T>
class Constants<Modulo<T>>

Public Static Functions

static inline int zero()
static inline int one()