Home | Trees | Index | Help |
|
---|
Package sage :: Package rings :: Module polylist_fcns |
|
Classes | |
---|---|
PolyList |
Function Summary | |
---|---|
Uses the "distributive representation" of polynomials left=[[c1,[e1,...,er]],...] <-> c1*x1^e1*...*xr^er+... | |
coeffs_polylist(polylist)
| |
degrevlex_monord(left,
right)
| |
expons_polylist(polylist)
| |
used to convert [[row1],[row2],...,[rowk]] matrix notation to [row1,...,rowk] (in fact, row sizes need not be the same) | |
left,right are monomial polylists... | |
INPUT:... | |
INPUT: self, other - any sequence OUTPUT: their intersection (again, order preserved) | |
INPUT: L is a list... | |
INPUT: L is a list OUTPUT: returns the sum of its entries | |
INPUT:... | |
Uses the "distributive representation" of polynomials left=[[c1,[e1,...,er]],...] <-> c1*x1^e1*...*xr^er+... | |
returns basis n-vector with a in ith position (a is an integer). | |
INPUT: list1,list2 are lists of numbers of same length OUTPUT: the component-wise sum, as though they were vectors |
Function Details |
---|
AddPolylists(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]]] AddPolylists(polylist1,polylist2,lex_monord) # [[2, [2, 3]], [4, [2, 1]], [-1, [1, 3]], [0, [1, 2]], [2, [1, 1]]] |
flatten(lists)used to convert [[row1],[row2],...,[rowk]] matrix notation to [row1,...,rowk] (in fact, row sizes need not be the same) EXAMPLES:>>> flatten([[1,2],[3,4]]) [1,2,3,4] |
lex_monord(left, right)left,right are monomial polylists returns comp fcn (i.e., takes values 1, 0, -1) on polylists EXAMPLES: polylist1=[[2,[2,3]],[3,[1,2]],[4,[2,1]]] polylist1.sort(lex_monord) polylist1 # [[2, [2, 3]], [4, [2, 1]], [3, [1, 2]]] |
list_filtered(L, boolprop)INPUT: L -- list boolprop -- a Boolean-valued function on the elements of list |
list_intersection(self, other)INPUT: self, other - any sequence OUTPUT: their intersection (again, order preserved) |
list_positions(L, x)INPUT: L is a list x is anything OUTPUT: the list of indices i where x = L[i] |
list_total(L)INPUT: L is a list OUTPUT: returns the sum of its entries |
list_union(self, other)INPUT: self -- list other -- list OUTPUT: list -- their union, with order preserved |
MultPolylists(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]]] |
standard_basis_vector(a, i, n)returns basis n-vector with a in ith position (a is an integer). |
vector_add(list1, list2)INPUT: list1,list2 are lists of numbers of same length OUTPUT: the component-wise sum, as though they were vectors |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jun 24 17:58:45 2005 | http://epydoc.sf.net |