You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# A linear forms is called alpha, it is represented by a vector in Q^d.
19
19
# A monomial m is a list of d integers
20
20
# A polynomial represented in a sparse way;
21
-
# Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
21
+
# Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
22
22
# Thus a sparse polynomial is represented as a list of lists.
23
23
#
24
24
# .
25
25
#
26
26
# Simplex and multiplicities.
27
27
#
28
-
# INPUT: d an integer, S list of d+1 lists of lenght d, alpha: list of lenght d .
28
+
# INPUT: d an integer, S list of d+1 lists of length d, alpha: list of length d .
29
29
# OUTPUT: set of lists {[a_S], [m_S]}
30
30
# MATH: S a simplex of dimension d+1, alpha a linear form, m_S is the list of the number of vertices S where <\alpha,S> = a_S.
31
31
#
@@ -136,7 +136,7 @@ L:=[seq([j],j=0..m[1])];fi;
136
136
newL;
137
137
end:
138
138
# INPUT: m a list of integers, coe a number
139
-
# OUTPUT: a list of lists of lenght nops(m)
139
+
# OUTPUT: a list of lists of length nops(m)
140
140
# MATH: The list $m$ represents the monomial x^m=x_1^{m[1]}x_2^{m[2]}\cdots x_d^{m[d].
141
141
# The output is a list of lists. Each element in the list represents a linear form ([1,2]=x+2y). The output exausts all the linear form with exponents M=m[1]+..+m[d] which appear when expressing x^m as linear combinations of linear form with exponent M. The first element is the coefficient multiplied by coe;
142
142
list_and_coeff_for_monome:=proc(m,coe) local M,L,out:
# We give a polynomial in a sparse way; Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
160
+
# We give a polynomial in a sparse way; Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
161
161
# We start by cleaning the sets for example we replace [[1,[1,2]],[1,[1,2]] by [2,[1,2]];
162
-
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The ouptput is
162
+
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The output is
163
163
# a set of lists.
164
164
# If alpha=beta, we replace by [a+b,alpha]; if a=0 we skip;
165
165
# The input is a list L of lists [a,\alpha] where a is a number. The output is of the same kind.
@@ -187,7 +187,7 @@ od;
187
187
Y;
188
188
end:
189
189
# The input is a simplex S, d the dimension, sparse_poly a sparse polynomial.
190
-
# The ouput is a number; the integral over S of the polynomial.
190
+
# The output is a number; the integral over S of the polynomial.
191
191
integral_via_waring:=proc(S,d,sparse_poly) local output,i, L ;output:=0;
# A linear forms is called alpha, it is represented by a vector in Q^d.
37
37
# A monomial m is a list of d integers
38
38
# A polynomial represented in a sparse way;
39
-
# Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
39
+
# Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
40
40
# Thus a sparse polynomial is represented as a list of lists.
41
41
#
42
42
# .
43
43
#
44
44
# Simplex and multiplicities.
45
45
#
46
-
# INPUT: d an integer, S list of d+1 lists of lenght d, alpha: list of lenght d .
46
+
# INPUT: d an integer, S list of d+1 lists of length d, alpha: list of length d .
47
47
# OUTPUT: set of lists {[a_S], [m_S]}
48
48
# MATH: S a simplex of dimension d+1, alpha a linear form, m_S is the list of the number of vertices S where <\alpha,S> = a_S.
49
49
#
@@ -154,7 +154,7 @@ L:=[seq([j],j=0..m[1])];fi;
154
154
newL;
155
155
end:
156
156
# INPUT: m a list of integers, coe a number
157
-
# OUTPUT: a list of lists of lenght nops(m)
157
+
# OUTPUT: a list of lists of length nops(m)
158
158
# MATH: The list $m$ represents the monomial x^m=x_1^{m[1]}x_2^{m[2]}\cdots x_d^{m[d].
159
159
# The output is a list of lists. Each element in the list represents a linear form ([1,2]=x+2y). The output exausts all the linear form with exponents M=m[1]+..+m[d] which appear when expressing x^m as linear combinations of linear form with exponent M. The first element is the coefficient multiplied by coe;
160
160
list_and_coeff_for_monome:=proc(m,coe) local M,L,out:
# We give a polynomial in a sparse way; Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
178
+
# We give a polynomial in a sparse way; Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
179
179
# We start by cleaning the sets for example we replace [[1,[1,2]],[1,[1,2]] by [2,[1,2]];
180
-
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The ouptput is
180
+
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The output is
181
181
# a set of lists.
182
182
# If alpha=beta, we replace by [a+b,alpha]; if a=0 we skip;
183
183
# The input is a list L of lists [a,\alpha] where a is a number. The output is of the same kind.
@@ -205,7 +205,7 @@ od;
205
205
Y;
206
206
end:
207
207
# The input is a simplex S, d the dimension, sparse_poly a sparse polynomial.
208
-
# The ouput is a number; the integral over S of the polynomial.
208
+
# The output is a number; the integral over S of the polynomial.
209
209
integral_via_waring:=proc(S,d,sparse_poly) local output,i, L ;output:=0;
0 commit comments