|
D.14.1.9 arrLastVar
Procedure from library arr.lib (see arr_lib).
- Usage:
- arrLastVar(A); arr A
- Return:
- [int] number of the last variable A uses
- Note:
- useful if you want a list containing all variables x_1 ... x_k used in A,
but you do not want to skip any like variables(A) does.
Example:
| LIB "arr.lib";
ring R = 0,x(1..10),dp;
arr A = ideal(x(1), x(2), x(3), x(6));
int n = arrLastVar(A);
varMat(1..n);
==> _[1,1]=x(1)
==> _[2,1]=x(2)
==> _[3,1]=x(3)
==> _[4,1]=x(4)
==> _[5,1]=x(5)
==> _[6,1]=x(6)
variables(A);
==> _[1]=x(1)
==> _[2]=x(2)
==> _[3]=x(3)
==> _[4]=x(6)
| See also:
arrLastVar;
arrSwapVar;
varMat;
varNum.
|