diff --git a/doc/cln.dvi b/doc/cln.dvi index 00de7ca..e2370f4 100644 Binary files a/doc/cln.dvi and b/doc/cln.dvi differ diff --git a/doc/cln.html b/doc/cln.html index 68af2b7..ebb2da6 100644 --- a/doc/cln.html +++ b/doc/cln.html @@ -1,6 +1,6 @@
- +cl_C_ring
, cl_R_ring
cl_boolean instanceof (const cl_number& x, const cl_number_ring& R)
+
Tests whether the given number is an element of the number ring R.
@@ -3459,14 +3460,14 @@ Tests whether the given number is an element of the number ring R.
7. Modular integers
7.1 Modular integer rings
@@ -3495,7 +3496,7 @@ The class of modular integer rings is
@@ -3517,11 +3518,11 @@ Modular integer rings are constructed using the function
cl_modint_ring cl_find_modint_ring (const cl_I& N)
-
+
This function returns the modular ring `Z/NZ'. It takes care
of finding out about special cases of N
, like powers of two
and odd numbers for which Montgomery multiplication will be a win,
-
+
and precomputes any necessary auxiliary data for computing modulo N
.
There is a cache table of rings, indexed by N
(or, more precisely,
by abs(N)
). This ensures that the precomputation costs are reduced
@@ -3536,10 +3537,10 @@ Modular integer rings can be compared for equality:
bool operator== (const cl_modint_ring&, const cl_modint_ring&)
-
+
bool operator!= (const cl_modint_ring&, const cl_modint_ring&)
-
+
These compare two modular integer rings for equality. Two different calls
to cl_find_modint_ring
with the same argument necessarily return the
same ring because it is memoized in the cache table.
@@ -3557,27 +3558,27 @@ Given a modular integer ring R
, the following members can be used.
cl_I R->modulus
-
+
This is the ring's modulus, normalized to be nonnegative: abs(N)
.
cl_MI R->zero()
-
+
This returns 0 mod N
.
cl_MI R->one()
-
+
This returns 1 mod N
.
cl_MI R->canonhom (const cl_I& x)
-
+
This returns x mod N
.
cl_I R->retract (const cl_MI& x)
-
+
This is a partial inverse function to R->canonhom
. It returns the
standard representative (>=0
, <N
) of x
.
@@ -3585,7 +3586,7 @@ standard representative (>=0
, <N
) of x
cl_MI R->random()
-
+
This returns a random integer modulo N
.
@@ -3597,20 +3598,20 @@ The following operations are defined on modular integers.
cl_modint_ring x.ring ()
-
+
Returns the ring to which the modular integer x
belongs.
cl_MI operator+ (const cl_MI&, const cl_MI&)
-
-Returns the sum of two modular integers. One of the arguments may also be
-a plain integer.
+
+Returns the sum of two modular integers. One of the arguments may also
+be a plain integer.
cl_MI operator- (const cl_MI&, const cl_MI&)
-
-Returns the difference of two modular integers. One of the arguments may also be
-a plain integer.
+
+Returns the difference of two modular integers. One of the arguments may also
+be a plain integer.
cl_MI operator- (const cl_MI&)
@@ -3618,61 +3619,61 @@ Returns the negative of a modular integer.
cl_MI operator* (const cl_MI&, const cl_MI&)
-
-Returns the product of two modular integers. One of the arguments may also be
-a plain integer.
+
+Returns the product of two modular integers. One of the arguments may also
+be a plain integer.
cl_MI square (const cl_MI&)
-
+
Returns the square of a modular integer.
cl_MI recip (const cl_MI& x)
-
+
Returns the reciprocal x^-1
of a modular integer x
. x
must be coprime to the modulus, otherwise an error message is issued.
cl_MI div (const cl_MI& x, const cl_MI& y)
-
+
Returns the quotient x*y^-1
of two modular integers x
, y
.
y
must be coprime to the modulus, otherwise an error message is issued.
cl_MI expt_pos (const cl_MI& x, const cl_I& y)
-
+
y
must be > 0. Returns x^y
.
cl_MI expt (const cl_MI& x, const cl_I& y)
-
+
Returns x^y
. If y
is negative, x
must be coprime to the
modulus, else an error message is issued.
cl_MI operator<< (const cl_MI& x, const cl_I& y)
-
+
Returns x*2^y
.
cl_MI operator>> (const cl_MI& x, const cl_I& y)
-
+
Returns x*2^-y
. When y
is positive, the modulus must be odd,
or an error message is issued.
bool operator== (const cl_MI&, const cl_MI&)
-
+
bool operator!= (const cl_MI&, const cl_MI&)
-
+
Compares two modular integers, belonging to the same modular integer ring,
for equality.
cl_boolean zerop (const cl_MI& x)
-
+
Returns true if x
is 0 mod N
.
@@ -3685,10 +3686,10 @@ input/output).
void fprint (cl_ostream stream, const cl_MI& x)
-
+
cl_ostream operator<< (cl_ostream stream, const cl_MI& x)
-
+
Prints the modular integer x
on the stream
. The output may depend
on the global printer settings in the variable cl_default_print_flags
.
@@ -3697,7 +3698,7 @@ on the global printer settings in the variable cl_default_print_flags8. Symbolic data types
@@ -3708,7 +3709,7 @@ CLN implements two symbolic (non-numeric) data types: strings and symbols.
8.1 Strings
@@ -3734,7 +3735,7 @@ Strings are constructed through the following constructors:
cl_string (const char * s)
-
+
Returns an immutable copy of the (zero-terminated) C string s
.
cl_string (const char * ptr, unsigned long len)
@@ -3755,21 +3756,21 @@ Assignment from cl_string
and const char *
.
s.length()
-
+
strlen(s)
-
+
Returns the length of the string s
.
s[i]
-
+
Returns the i
th character of the string s
.
i
must be in the range 0 <= i < s.length()
.
bool equal (const cl_string& s1, const cl_string& s2)
-
+
Compares two strings for equality. One of the arguments may also be a
plain const char *
.
@@ -3778,7 +3779,7 @@ plain const char *
.
8.2 Symbols
@@ -3798,7 +3799,7 @@ Symbols are constructed through the following constructor:
cl_symbol (const cl_string& s)
-
+
Looks up or creates a new symbol with a given name.
@@ -3815,7 +3816,7 @@ Conversion to cl_string
: Returns the string which names the symbol
bool equal (const cl_symbol& sym1, const cl_symbol& sym2)
-
+
Compares two symbols for equality. This is very fast.
@@ -3823,8 +3824,8 @@ Compares two symbols for equality. This is very fast.
9. Univariate polynomials
cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R)
-
+
cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)
cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R)
@@ -3972,33 +3973,33 @@ Given a univariate polynomial ring R
, the following members can be
cl_ring R->basering()
-
+
This returns the base ring, as passed to `cl_find_univpoly_ring'.
cl_UP R->zero()
-
+
This returns 0 in R
, a polynomial of degree -1.
cl_UP R->one()
-
+
This returns 1 in R
, a polynomial of degree <= 0.
cl_UP R->canonhom (const cl_I& x)
-
+
This returns x in R
, a polynomial of degree <= 0.
cl_UP R->monomial (const cl_ring_element& x, uintL e)
-
+
This returns a sparse polynomial: x * X^e
, where X
is the
indeterminate.
cl_UP R->create (sintL degree)
-
+
Creates a new polynomial with a given degree. The zero polynomial has degree
-1
. After creating the polynomial, you should put in the coefficients,
using the set_coeff
member function, and then call the finalize
@@ -4013,14 +4014,14 @@ The following are the only destructive operations on univariate polynomials.
void set_coeff (cl_UP& x, uintL index, const cl_ring_element& y)
-
+
This changes the coefficient of X^index
in x
to be y
.
After changing a polynomial and before applying any "normal" operation on it,
you should call its finalize
member function.
void finalize (cl_UP& x)
-
+
This function marks the endpoint of destructive modifications of a polynomial.
It normalizes the internal representation so that subsequent computations have
less overhead. Doing normal computations on unnormalized polynomials may
@@ -4035,17 +4036,17 @@ The following operations are defined on univariate polynomials.
cl_univpoly_ring x.ring ()
-
+
Returns the ring to which the univariate polynomial x
belongs.
cl_UP operator+ (const cl_UP&, const cl_UP&)
-
+
Returns the sum of two univariate polynomials.
cl_UP operator- (const cl_UP&, const cl_UP&)
-
+
Returns the difference of two univariate polynomials.
cl_UP operator- (const cl_UP&)
@@ -4054,54 +4055,54 @@ Returns the negative of a univariate polynomial.
cl_UP operator* (const cl_UP&, const cl_UP&)
-
+
Returns the product of two univariate polynomials. One of the arguments may
also be a plain integer or an element of the base ring.
cl_UP square (const cl_UP&)
-
+
Returns the square of a univariate polynomial.
cl_UP expt_pos (const cl_UP& x, const cl_I& y)
-
+
y
must be > 0. Returns x^y
.
bool operator== (const cl_UP&, const cl_UP&)
-
+
bool operator!= (const cl_UP&, const cl_UP&)
-
+
Compares two univariate polynomials, belonging to the same univariate
polynomial ring, for equality.
cl_boolean zerop (const cl_UP& x)
-
+
Returns true if x
is 0 in R
.
sintL degree (const cl_UP& x)
-
+
Returns the degree of the polynomial. The zero polynomial has degree -1
.
cl_ring_element coeff (const cl_UP& x, uintL index)
-
+
Returns the coefficient of X^index
in the polynomial x
.
cl_ring_element x (const cl_ring_element& y)
-
+
Evaluation: If x
is a polynomial and y
belongs to the base ring,
then `x(y)' returns the value of the substitution of y
into
x
.
cl_UP deriv (const cl_UP& x)
-
+
Returns the derivative of the polynomial x
with respect to the
indeterminate X
.
@@ -4115,10 +4116,10 @@ input/output).
void fprint (cl_ostream stream, const cl_UP& x)
-
+
cl_ostream operator<< (cl_ostream stream, const cl_UP& x)
-
+
Prints the univariate polynomial x
on the stream
. The output may
depend on the global printer settings in the variable
cl_default_print_flags
.
@@ -4136,26 +4137,26 @@ The following functions return special polynomials.
cl_UP_I cl_tschebychev (sintL n)
-
+
Returns the n-th Tchebychev polynomial (n >= 0).
cl_UP_I cl_hermite (sintL n)
-
+
Returns the n-th Hermite polynomial (n >= 0).
cl_UP_RA cl_legendre (sintL n)
-
+
Returns the n-th Legendre polynomial (n >= 0).
cl_UP_I cl_laguerre (sintL n)
-
+
Returns the n-th Laguerre polynomial (n >= 0).
@@ -4173,7 +4174,7 @@ of these polynomials from their definition can be found in the
10.1 Why C++ ?
@@ -4188,7 +4189,7 @@ Efficiency: It compiles to machine code.
-
+
Portability: It runs on all platforms supporting a C++ compiler. Because
of the availability of GNU C++, this includes all currently used 32-bit and
64-bit platforms, independently of the quality of the vendor's C++ compiler.
@@ -4234,8 +4235,8 @@ Object sharing: An operation like x+0
returns x
withou
it.
-
+
Garbage collection: A reference counting mechanism makes sure that any
number object's storage is freed immediately when the last reference to the
object is gone.
@@ -4280,7 +4281,7 @@ algorithm.
For very large numbers (more than 12000 decimal digits), CLN uses
Schönhage-Strassen
-
+
multiplication, which is an asymptotically optimal multiplication
algorithm.
@@ -4293,7 +4294,7 @@ of division and radix conversion.
10.4 Garbage collection
@@ -4331,7 +4332,7 @@ environment variables, or directly substitute the appropriate values.
11.1 Compiler options
@@ -4370,8 +4371,8 @@ linking a CLN application it is sufficient to give the flag -lcln
.
11.2 Include files
@@ -4568,7 +4569,7 @@ Includes all of the above.
A function which computes the nth Fibonacci number can be written as follows.
-
+
@@ -4654,7 +4655,7 @@ contains this implementation together with an even faster algorithm.
11.4 Debugging support
@@ -4688,7 +4689,7 @@ CLN offers a function cl_print
, callable from the debugger,
for printing number objects. In order to get this function, you have
to define the macro `CL_DEBUG' and then include all the header files
for which you want cl_print
debugging support. For example:
-
+
#define CL_DEBUG
@@ -4715,7 +4716,7 @@ only with number objects and similar. Therefore CLN offers a member function
debug_print()
on all CLN types. The same macro `CL_DEBUG'
is needed for this member function to be implemented. Under gdb
,
you call it like this:
-
+
(gdb) print s
@@ -4737,7 +4738,7 @@ Unfortunately, this feature does not seem to work under all circumstances.
12. Customizing
-
+
This function must not return control to its caller.
@@ -4765,7 +4766,7 @@ This function must not return control to its caller.
12.2 Floating-point underflow
@@ -4791,7 +4792,7 @@ will be generated instead. The default value of
The output of the function fprint
may be customized by changing the
value of the global variable cl_default_print_flags
.
-
+
@@ -4815,8 +4816,8 @@ void (*cl_free_hook) (void* ptr) = ...;
-
+
The cl_malloc_hook
function must not return a NULL
pointer.
@@ -4836,7 +4837,7 @@ Jump to:
-This document was generated on 5 May 2000 using
+This document was generated on 19 May 2000 using
texi2html 1.56k.