#include <envelope.h>
Inheritance diagram for FieldEnvelope:
Public Types | |
typedef ElementEnvelope< Field > | Element |
typedef RandIterEnvelope< Field > | RandIter |
Public Methods | |
Object Management | |
FieldEnvelope (void) | |
FieldEnvelope (const Field &F) | |
FieldEnvelope (const FieldEnvelope &E) | |
FieldAbstract * | clone () const |
FieldAbstract & | operator= (const FieldAbstract &F) |
ElementAbstract & | init (ElementAbstract &x, const integer &y=0) const |
integer & | convert (integer &x, const ElementAbstract &y) const |
ElementAbstract & | assign (ElementAbstract &x, const ElementAbstract &y) const |
integer & | cardinality (integer &c) const |
integer & | characteristic (integer &c) const |
Arithmetic Operations | |
x <- y op z; x <- op y These operations require all elements, including x, to be initialized before the operation is called. Uninitialized field base elements will give undefined results. | |
Object Management bool | areEqual (const ElementAbstract &x, const ElementAbstract &y) const |
ElementAbstract & | add (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
ElementAbstract & | sub (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
ElementAbstract & | mul (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
ElementAbstract & | div (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
ElementAbstract & | neg (ElementAbstract &x, const ElementAbstract &y) const |
ElementAbstract & | inv (ElementAbstract &x, const ElementAbstract &y) const |
ElementAbstract & | axpy (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x, const ElementAbstract &y) const |
Inplace Arithmetic Operations | |
x <- x op y; x <- op x | |
Arithmetic Operations bool | isZero (const ElementAbstract &x) const |
bool | isOne (const ElementAbstract &x) const |
ElementAbstract & | addin (ElementAbstract &x, const ElementAbstract &y) const |
ElementAbstract & | subin (ElementAbstract &x, const ElementAbstract &y) const |
ElementAbstract & | mulin (ElementAbstract &x, const ElementAbstract &y) const |
ElementAbstract & | divin (ElementAbstract &x, const ElementAbstract &y) const |
ElementAbstract & | negin (ElementAbstract &x) const |
ElementAbstract & | invin (ElementAbstract &x) const |
ElementAbstract & | axpyin (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x) const |
Input/Output Operations | |
Inplace Arithmetic Operations std::ostream & | write (std::ostream &os) const |
std::istream & | read (std::istream &is) |
std::ostream & | write (std::ostream &os, const ElementAbstract &x) const |
std::istream & | read (std::istream &is, ElementAbstract &x) const |
Protected Attributes | |
Field | _field |
Wrapped field. | |
Friends | |
class | RandIterEnvelope< Field > |
|
element type. It is derived from the class ElementAbstract, and it must contain a wrapped field element. Reimplemented from FieldAbstract. Reimplemented in RingEnvelope. |
|
Random iterator generator type. It is derived from the class RandIterAbstract, and it must contain a wrapped field random iterator generator. Reimplemented from FieldAbstract. Reimplemented in RingEnvelope. |
|
Default constructor. In this implementation, this means copying the field {\tt E.\_field}. |
|
Constructor from field to be wrapped.
|
|
Copy constructor. Constructs FieldEnvelope object by copying the field. This is required to allow field objects to be passed by value into functions. In this implementation, this means copying the field {\tt E.\_field}.
|
|
Addition. x = y + z This function assumes all the field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Inplace Addition. x += y This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Equality of two elements. This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Assignment of one field base element to another. This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Natural AXPY. r = a * x + y This function assumes all field elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Inplace AXPY. r += a * x This function assumes all field elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Cardinality. Return integer representing cardinality of the domain. Returns a non-negative integer for all domains with finite cardinality, and returns -1 to signify a domain of infinite cardinality.
Implements FieldAbstract. Reimplemented in RingEnvelope. |
|
Characteristic. Return integer representing characteristic of the domain. Returns a positive integer to all domains with finite characteristic, and returns 0 to signify a domain of infinite characteristic.
Implements FieldAbstract. Reimplemented in RingEnvelope. |
|
Virtual copy constructor. Required because constructors cannot be virtual. Passes construction on to derived classes. This function is not part of the common object interface.
Implements FieldAbstract. Reimplemented in RingEnvelope. |
|
Conversion of field base element to a template class T. This function assumes the output field base element x has already been constructed, but that it is not already initialized.
Reimplemented in RingEnvelope. |
|
Division. x = y / z This function assumes all the field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Inplace Division. x /= y This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Initialization of field base element from an integer. Behaves like C++ allocator construct. This function assumes the output field base element x has already been constructed, but that it is not already initialized. This is not a specialization of the template function because such a specialization is not allowed inside the class declaration.
Reimplemented in RingEnvelope. |
|
Multiplicative Inverse. x = 1 / y This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Inplace Multiplicative Inverse. x = 1 / x This function assumes the field base elementhas already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
One equality. Test if field base element is equal to one. This function assumes the field base element has already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Zero equality. Test if field base element is equal to zero. This function assumes the field base element has already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Multiplication. x = y * z This function assumes all the field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Inplace Multiplication. x *= y This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Additive Inverse (Negation). x = - y This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Inplace Additive Inverse (Inplace Negation). x = - x This function assumes the field base element has already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Assignment operator. Required by abstract base class.
Implements FieldAbstract. Reimplemented in RingEnvelope. |
|
Read field base element. This function assumes the field base element has already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Read field.
Implements FieldAbstract. Reimplemented in RingEnvelope. |
|
Subtraction. x = y - z This function assumes all the field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Inplace Subtraction. x -= y This function assumes both field base elements have already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Print field base element. This function assumes the field base element has already been constructed and initialized.
Reimplemented in RingEnvelope. |
|
Print field.
Implements FieldAbstract. Reimplemented in RingEnvelope. |
|
|
|
Wrapped field.
|