manpagez: man pages & more
info cln
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.1 Univariate polynomial rings

CLN implements univariate polynomials (polynomials in one variable) over an arbitrary ring. The indeterminate variable may be either unnamed (and will be printed according to default_print_flags.univpoly_varname, which defaults to ‘x’) or carry a given name. The base ring and the indeterminate are explicitly part of every polynomial. CLN doesn’t allow you to (accidentally) mix elements of different polynomial rings, e.g. (a^2+1) * (b^3-1) will result in a runtime error. (Ideally this should return a multivariate polynomial, but they are not yet implemented in CLN.)

The classes of univariate polynomial rings are

                           Ring
                         cl_ring
                       <cln/ring.h>
                            |
                            |
                 Univariate polynomial ring
                      cl_univpoly_ring
                      <cln/univpoly.h>
                            |
           +----------------+-------------------+
           |                |                   |
 Complex polynomial ring    |    Modular integer polynomial ring
 cl_univpoly_complex_ring   |        cl_univpoly_modint_ring
 <cln/univpoly_complex.h>   |        <cln/univpoly_modint.h>
                            |
           +----------------+
           |                |
   Real polynomial ring     |
   cl_univpoly_real_ring    |
   <cln/univpoly_real.h>    |
                            |
           +----------------+
           |                |
 Rational polynomial ring   |
 cl_univpoly_rational_ring  |
 <cln/univpoly_rational.h>  |
                            |
           +----------------+
           |
 Integer polynomial ring
 cl_univpoly_integer_ring
 <cln/univpoly_integer.h>

and the corresponding classes of univariate polynomials are

                   Univariate polynomial
                          cl_UP
                      <cln/univpoly.h>
                            |
           +----------------+-------------------+
           |                |                   |
   Complex polynomial       |      Modular integer polynomial
        cl_UP_N             |                cl_UP_MI
 <cln/univpoly_complex.h>   |        <cln/univpoly_modint.h>
                            |
           +----------------+
           |                |
     Real polynomial        |
        cl_UP_R             |
  <cln/univpoly_real.h>     |
                            |
           +----------------+
           |                |
   Rational polynomial      |
        cl_UP_RA            |
 <cln/univpoly_rational.h>  |
                            |
           +----------------+
           |
   Integer polynomial
        cl_UP_I
 <cln/univpoly_integer.h>

Univariate polynomial rings are constructed using the functions

cl_univpoly_ring find_univpoly_ring (const cl_ring& R)
cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)

This function returns the polynomial ring ‘R[X]’, unnamed or named. R may be an arbitrary ring. This function takes care of finding out about special cases of R, such as the rings of complex numbers, real numbers, rational numbers, integers, or modular integer rings. There is a cache table of rings, indexed by R and varname. This ensures that two calls of this function with the same arguments will return the same polynomial ring.

cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)
cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)
cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)
cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)
cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)
cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)
cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)
cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)
cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)
cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)

These functions are equivalent to the general find_univpoly_ring, only the return type is more specific, according to the base ring’s type.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on August 27, 2013 using texi2html 5.0.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.