#include <SimSeqs.h>
Public Methods | |
| longpoly (long cflen=15, long bs=0) | |
| ~longpoly () | |
| long | GetDegree () |
| long | SetDegree (long deg) |
| long | SetCoeff (long k, long val) |
| long | GetCoeff (long k) |
| longpoly* | times (longpoly &poly1) |
Protected Attributes | |
| long | deg |
| long | base |
| long* | coeff |
| long | coefflen |
I know, this should probably be implemented as a Template class so that arbitrary data types are allowed. I'm just too lazy for now ;-)
|
|
initializes the polynomial with the given number of coefficients (order, default is 15) and in base bs (default is 0). If bs is set <=0, this means: "Don't do any modulo operations on the coefficients",i.e. we are in Z |
|
|
|
|
|
Gets the k-th coefficient.
|
|
|
Returns the degree of the polynomial (memory allocated for the coefficients).
|
|
|
Sets the k-th coefficient to val.
|
|
|
Sets a new possible degree for the polynomial by allocating sufficient memory (old coefficients are preserved).
|
|
|
multiply this polynomial with another one (poly1). A new longpoly object is returned, which has to be free manually / by the garbage collection |
|
|
if we are in the Ring Z_n, this is the base for all the modulo operations.
|
|
|
this field stores the coefficients of the polynomial.
|
|
|
Size of memory allocated for the coefficients.
|
|
|
stores the degree of the polynomial.
|
1.2.7 written by Dimitri van Heesch,
© 1997-2001