NZMATH  1.2.0 About: NZMATH is a Python based number theory oriented calculation system.   Fossies Dox: NZMATH-1.2.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)
nzmath.poly.uniutil Namespace Reference

## Classes

class  ContentProvider

class  DivisionProvider

class  DomainPolynomial

class  FieldPolynomial

class  FiniteFieldPolynomial

class  FinitePrimeFieldPolynomial

class  IntegerPolynomial

class  KaratsubaProvider

class  OrderProvider

class  PrimeCharacteristicFunctionsProvider

class  PseudoDivisionProvider

class  RingElementProvider

class  RingPolynomial

class  SubresultantGcdProvider

class  UniqueFactorizationDomainPolynomial

class  VariableProvider

## Functions

def inject_variable (polynom, variable)

def polynomial (coefficients, coeffring)

def OneVariableDensePolynomial (coefficient, variable, coeffring=None)

def OneVariableSparsePolynomial (coefficient, variable, coeffring=None)

def init_coefficient_ring (coefficients)

## Variables

_log = logging.getLogger("nzmath.poly.uniutil")

string _MIXIN_MSG = "%s is mix-in"

dictionary special_ring_table = {rational.IntegerRing: IntegerPolynomial}

## Detailed Description

```Utilities for univar.

The module provides higher level interfaces to univar classes and
functions.
```

## ◆ init_coefficient_ring()

 def nzmath.poly.uniutil.init_coefficient_ring ( coefficients )
```Return a ring to which all coefficients belong.  The argument
coefficients is a dictionary whose values are the coefficients.
```

Definition at line 1648 of file uniutil.py.

## ◆ inject_variable()

 def nzmath.poly.uniutil.inject_variable ( polynom, variable )
```Inject variable into polynom temporarily.  The variable name will
be lost after any arithmetic operations on polynom, though the
class name of polynom will remain prefixed with 'Var'.  If one need
variable name permanently, he/she should define a class inheriting
VariableProvider.
```

Definition at line 1571 of file uniutil.py.

## ◆ OneVariableDensePolynomial()

 def nzmath.poly.uniutil.OneVariableDensePolynomial ( coefficient, variable, coeffring = `None` )
```OneVariableDensePolynomial(coefficient, variable [,coeffring])

- coefficient has to be a sequence of coefficients in ascending order
of degree.
- variable has to be a character string.
- coeffring has to be, if specified, an object inheriting ring.Ring.

This function is provided for backward compatible way of defining
univariate polynomial.  The argument variable is ignored.
```

Definition at line 1615 of file uniutil.py.

## ◆ OneVariableSparsePolynomial()

 def nzmath.poly.uniutil.OneVariableSparsePolynomial ( coefficient, variable, coeffring = `None` )
```OneVariableSparsePolynomial(coefficient, variable [,coeffring])

- coefficient has to be a dictionary of degree-coefficient pairs.
- variable has to be a character string.
- coeffring has to be, if specified, an object inheriting ring.Ring.

This function is provided for backward compatible way of defining
univariate polynomial.  The argument variable is ignored.
```

Definition at line 1632 of file uniutil.py.

## ◆ polynomial()

 def nzmath.poly.uniutil.polynomial ( coefficients, coeffring )
```Return a polynomial.
- coefficients has to be a initializer for dict, whose keys are
degrees and values are coefficients at degrees.
- coeffring has to be an object inheriting ring.Ring.

One can override the way to choose a polynomial type from a
coefficient ring, by setting:
special_ring_table[coeffring_type] = polynomial_type
before the function call.
```

Definition at line 1590 of file uniutil.py.

## ◆ _log

 nzmath.poly.uniutil._log = logging.getLogger("nzmath.poly.uniutil")
private

Definition at line 22 of file uniutil.py.

## ◆ _MIXIN_MSG

 string nzmath.poly.uniutil._MIXIN_MSG = "%s is mix-in"
private

Definition at line 25 of file uniutil.py.

## ◆ special_ring_table

 dictionary nzmath.poly.uniutil.special_ring_table = {rational.IntegerRing: IntegerPolynomial}

Definition at line 1587 of file uniutil.py.