Mackey  V3.1
A C++ library for computing RO(G) graded homology
Z< N, T > Class Template Reference

The class of Z/N coefficients where N is prime. More...

#include <Z_n.hpp>

Public Member Functions

 Z ()
 Default value 0. More...
 
 Z (bool x)
 Initialize from 0,1. More...
 
 Z (int x)
 Initialize from int. More...
 
 Z (int64_t x)
 Initialize from 64bit int. More...
 
 operator char () const
 
 operator short () const
 
 operator int () const
 
 operator int64_t () const
 
 operator unsigned char () const
 
 operator unsigned short () const
 
 operator unsigned int () const
 
 operator uint64_t () const
 
Z< N, T > operator+ (Z< N, T > b) const
 
Z< N, T > operator- (Z< N, T > b) const
 
Z< N, T > & operator+= (Z< N, T > b)
 
Z< N, T > & operator-= (Z< N, T > b)
 
Z< N, T > & operator*= (Z< N, T > b)
 
Z< N, T > & operator/= (Z< N, T > b)
 
bool operator== (Z< N, T > a) const
 
bool operator!= (Z< N, T > a) const
 
bool operator<= (Z< N, T > a) const
 Needed for Eigen pruning; standard order on 0,...,N-1. More...
 

Public Attributes

x
 A modulo N number. More...
 

Static Public Attributes

constexpr static int64_t order = N
 The N of Z/N. More...
 

Detailed Description

template<int64_t N, typename T = int64_t>
class Mackey::Z< N, T >

The class of Z/N coefficients where N is prime.

The operators are self explanatory. User must ensure that N is prime for division to work.

Constructor & Destructor Documentation

◆ Z() [1/4]

Z ( )
inline

Default value 0.

◆ Z() [2/4]

Z ( bool  x)
inline

Initialize from 0,1.

◆ Z() [3/4]

Z ( int  x)

Initialize from int.

◆ Z() [4/4]

Z ( int64_t  x)

Initialize from 64bit int.

Member Function Documentation

◆ operator char()

operator char ( ) const
explicit

◆ operator short()

operator short ( ) const
explicit

◆ operator int()

operator int ( ) const
explicit

◆ operator int64_t()

operator int64_t ( ) const
explicit

◆ operator unsigned char()

operator unsigned char ( ) const
explicit

◆ operator unsigned short()

operator unsigned short ( ) const
explicit

◆ operator unsigned int()

operator unsigned int ( ) const
explicit

◆ operator uint64_t()

operator uint64_t ( ) const
explicit

◆ operator+()

Z<N, T> operator+ ( Z< N, T >  b) const

◆ operator-()

Z<N, T> operator- ( Z< N, T >  b) const

◆ operator+=()

Z<N, T>& operator+= ( Z< N, T >  b)

◆ operator-=()

Z<N, T>& operator-= ( Z< N, T >  b)

◆ operator*=()

Z<N, T>& operator*= ( Z< N, T >  b)

◆ operator/=()

Z<N, T>& operator/= ( Z< N, T >  b)

◆ operator==()

bool operator== ( Z< N, T >  a) const

◆ operator!=()

bool operator!= ( Z< N, T >  a) const

◆ operator<=()

bool operator<= ( Z< N, T >  a) const

Needed for Eigen pruning; standard order on 0,...,N-1.

Member Data Documentation

◆ order

constexpr static int64_t order = N
staticconstexpr

The N of Z/N.

◆ x

T x

A modulo N number.


The documentation for this class was generated from the following file: