#include <linteger/residue.hxx>
ResidueClass::ResidueClass();This constructor creates a NULL instance, which represent no residue class in the current residue ring. Be sure to assign a proper value to this instance before using it.
LInteger
ResidueClass::ResidueClass(const LInteger& x);This constructor creates an instance representing the residue class within the current ring that contains the integer that x represents.
ResidueClass::ResidueClass(const ResidueClass& x);The copy constructor creates an instance representing the same residue class that x represents.
ResidueClass::~ResidueClass();Nothing special is done by the destructor.
ResidueClass
inline ResidueClass& ResidueClass::operator=(const ResidueClass& x);This assignment makes the calling instance represent the same residue class that x represents. A reference to the modified calling instance is returned.
static inline ResidueClass ResidueClass::MultiplicativeIdentity();This method returns an instance representing the residue class which is the multiplicative identity of the current residue ring.
static inline const LInteger& ResidueClass::Ring();This method return an
LInteger
representing an
integer, x, which is equal to the
number of elements in the current residue ring. That is to say, arithmetic
is taking place mod x.
static inline LInteger ResidueClass::SetRing(const LInteger& x);This method sets the residue ring in which arithmetic is to take place. The residue ring will be the one with a number of elements equal to the integer that x represents. That is to say, arithmetic will take place mod x. In order to ensure that the residue ring will have a multiplicative identity, x must be positive. An
LInteger
representing
the cardinality of the ring arithmetic was to take place in before the
call is returned.
y*=x
inline ResidueClass& operator*=(const ResidueClass& x);This operator makes the calling instance represent the product (in the current residue ring) of the residue class it represented before the call and the residue class that x represents. A reference to the modified calling instance is returned.
inline ResidueClass& ResidueClass::Square();This method makes the calling instance represent the square (in the current residue ring) of residue class it represented before the call, and returns a reference to the modified calling instance.
inline LInteger ResidueClass::ToLInteger();This method returns an
LIntger
which
represents the principal residue in
the residue class that the calling instance represents. That is
to say, that if the current residue ring has x elements, then
this method will return the member of the residue class that the
calling instance represents that is greater than or equal to
0, but less than x.