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.termorder Namespace Reference

## Classes

class  MultivarTermOrder

class  TermOrderInterface

class  UnivarTermOrder

## Functions

def weight_order (weight, tie_breaker=None)

def _total_degree_lexicographic (left, right)

def _total_degree_reverse_lexicographic (left, right)

def _sort_with_cmp (seq, mycmp)
for compatibility function More...

## Variables

string _INTERFACE_MSG = "%s is interface"

ascending_order = UnivarTermOrder(cmp)

lexicographic_order = MultivarTermOrder(cmp)

total_degree_lexicographic_order = MultivarTermOrder(_total_degree_lexicographic)

total_degree_reverse_lexicographic_order = MultivarTermOrder(_total_degree_reverse_lexicographic)

obj

## Detailed Description

Term Order for polynomials.

## ◆ _sort_with_cmp()

 def nzmath.poly.termorder._sort_with_cmp ( seq, mycmp )
private

for compatibility function

Return the sorted seq by using the comparator function mycmp.

Definition at line 389 of file termorder.py.

## ◆ _total_degree_lexicographic()

 def nzmath.poly.termorder._total_degree_lexicographic ( left, right )
private
Total degree lexicographic (or graded lexicographic) term order :
L < R iff
(1) sum(li) < sum(ri) or
(2) sum(li) = sum(ri) and
there exists i s.t. l0 == r0, ..., l(i-1) == r(i-1), li < ri.

Definition at line 355 of file termorder.py.

References nzmath.compatibility.cmp.

## ◆ _total_degree_reverse_lexicographic()

 def nzmath.poly.termorder._total_degree_reverse_lexicographic ( left, right )
private
Total degree reverse lexicographic (or graded reverse
lexicographic) term order :
L < R iff
(1) sum(li) < sum(ri) or
(2) sum(li) = sum(ri) and
there exists i s.t. ln == rn, ..., l(i+1) == r(i+1), li > ri.

Definition at line 368 of file termorder.py.

References nzmath.compatibility.cmp.

## ◆ weight_order()

 def nzmath.poly.termorder.weight_order ( weight, tie_breaker = None )
Return a comparator of weight ordering.

The weight ordering is defined for arguments x and y that x < y
if w.x < w.y (dot products) or w.x == w.y and tie breaker tells
x < y.

The option 'tie_breaker' is another comparator that will be used
if dot products with the weight vector leaves arguments tie.  If
the option is None (default) and a tie breaker is indeed necessary
to order given arguments, a TypeError is raised.

Definition at line 331 of file termorder.py.

References nzmath.compatibility.cmp.

## ◆ _INTERFACE_MSG

 string nzmath.poly.termorder._INTERFACE_MSG = "%s is interface"
private

Definition at line 10 of file termorder.py.

## ◆ ascending_order

 nzmath.poly.termorder.ascending_order = UnivarTermOrder(cmp)

Definition at line 231 of file termorder.py.

## ◆ lexicographic_order

 nzmath.poly.termorder.lexicographic_order = MultivarTermOrder(cmp)

Definition at line 383 of file termorder.py.

## ◆ obj

 nzmath.poly.termorder.obj

Definition at line 399 of file termorder.py.

## ◆ total_degree_lexicographic_order

 nzmath.poly.termorder.total_degree_lexicographic_order = MultivarTermOrder(_total_degree_lexicographic)

Definition at line 384 of file termorder.py.

## ◆ total_degree_reverse_lexicographic_order

 nzmath.poly.termorder.total_degree_reverse_lexicographic_order = MultivarTermOrder(_total_degree_reverse_lexicographic)

Definition at line 385 of file termorder.py.