Next
Previous
Table of Contents
The MontyRing Class
#include <linteger/montyrep.hxx>
Overview
The goal of the MontyRing class is to provide objects to
save the precomputation information computed after choosing a
ring of residue classes that will be manipulated internally
using a representation due to
Montgomery (1985).
Public Methods
Default Constructor
MontyRing::MontyRing();
This constructor creates a NULL instance, representing no choice
of a residue ring that Montgomery representation are to be used in.
Constructor from an LInteger
MontyRing::MontyRing(const LInteger& N);
This constructor creates an object which saves the precomputation
information for the ring of residue classes with a cardinality
equal to the integer that N represents. This library
only allows the use of Montgomery representations for residue rings
of odd, and greater than one, cardinality.
Copy Constructor
MontyRing::MontyRing(const MontyRing& x);
The copy constructor creates an instance containing the
same precomputation information that x contains.
The newly created instance represents the same choice of
residue rings that x represents.
Destructor
MontyRing::~MontyRing();
The destructor deletes the memory dynamically allocated to the
instance.
Assignment from a MontyRing
inline MontyRing& MontyRing::operator=(const MontyRing& x);
This assignment makes the calling instance contain
the same precomputation information that x contains,
and returns a reference to the modified calling instance. The
calling instance will then represent the same choice of
residue rings that x represents.
Next
Previous
Table of Contents