SP::SpSpecialize
--
specializes a set of variables
SP::SpSpecialize(expr,gname,f,args)
expr | - | any expression |
gname | - | any string or indexed |
f | - | any procedure |
args | - | any (extra) parameters for f |
The SP::SpSpecialize
function is devoted to specialize a set of variables.
This can be all variables generated by the generic name gname in such a
way that the variable gname.i
is sent onto f(i, args)
.
This function can also be used to specialize indexed variables named
gname[
sequence]
onto f([
sequence], args)
.
>> muEC::SP::SpSpecialize(x1 + y3 + xx2 + x3^3, x, i->y.i);
3 xx2 + y1 + y3 + y3
>> deg:=3: // you should use a map to specialize a table...
map(muEC::SP::TableX(deg), muEC::SP::SpSpecialize, x,
proc(i,d) begin q^(d-i) end_proc, deg);
table( 5 [3, 2, 1] = q , 3 [2, 3, 1] = q , 2 [2, 1, 3] = q , 4 [3, 1, 2] = q , 2 [1, 3, 2] = q + q , [1, 2, 3] = 1 )
>> // specialization of the yi's as the permutation [3,1,2] of the xi's...
map(muEC::SP::TableXX(3), muEC::SP::SpSpecialize, y,
(i,perm)->x.(perm[i]), [3,1,2]);
table( [3, 2, 1] = 0, [2, 3, 1] = (x1 - x3) (x2 - x3), [2, 1, 3] = x1 - x3, [3, 1, 2] = 0, [1, 3, 2] = x2 - x3, [1, 2, 3] = 1 )
SG::Perm2Code
, TableX
, TableXX
MuPAD Combinat, an open source algebraic combinatorics package