Package sage :: Package rings :: Module polylist_fcns :: Class PolyList
[show private | hide private]
[frames | no frames]

Class PolyList


Method Summary
  __init__(self, plist, morder)
  __add__(self, other)
  __getitem__(self, key)
  __len__(self)
  __mul__(self, other)
  __or__(self, other)
  __repr__(self)
  __str__(self)
  add_polylists(left, right, monord)
Uses the "distributive representation" of polynomials left=[[c1,[e1,...,er]],...] <-> c1*x1^e1*...*xr^er+...
  concat(self, value)
  dirac_delta(i, j)
input: i,j, objects output: 1 if i==j, 0 otherwise
  intersect(self, other)
  mult_polylists(left, right, monord)
Uses the "distributive representation" of polynomials left=[[c1,[e1,...,er]],...] <-> c1*x1^e1*...*xr^er+...
  union(self, other)

Method Details

add_polylists(left, right, monord=<function lex_monord at 0xab649a04>)

Uses the "distributive representation" of polynomials left=[[c1,[e1,...,er]],...] <-> c1*x1^e1*...*xr^er+...

EXAMPLES: (collection is illustrated)

polylist1=[[2,[2,3]],[3,[1,2]],[4,[2,1]]] polylist2=[[-1,[1,3]],[-3,[1,2]],[2,[1,1]]] add_polylists(polylist1,polylist2,lex_monord) # [[2, [2, 3]], [4, [2, 1]], [-1, [1, 3]], [0, [1, 2]], [2, [1, 1]]]

dirac_delta(i, j)

input: i,j, objects output: 1 if i==j, 0 otherwise

mult_polylists(left, right, monord=<function lex_monord at 0xab649a04>)

Uses the "distributive representation" of polynomials left=[[c1,[e1,...,er]],...] <-> c1*x1^e1*...*xr^er+...

EXAMPLE: (illustrates cancellation)

polylist1=[[2,[2,3]],[3,[1,2]],[4,[2,1]]] polylist2=[[-1,[1,3]],[-3,[1,2]],[2,[1,1]]] mult_polylists(polylist1,polylist2) # [[-2, [3, 6]], [-6, [3, 5]], [[0, [3, 4]]], [-3, [2, 5]], # [-9, [2, 4]], [6, [2, 3]], [-12, [3, 3]], [8, [3, 2]]]

Generated by Epydoc 2.1 on Fri Jun 24 17:58:45 2005 http://epydoc.sf.net