returns the rank of a given matrix which is filled with elements
of the ground field.
The first variant uses a LU-decomposition, the second a row-echelon form.
Note:
The function works by computing the row echelon form of the matrix using
the same algorithm as for ludecomp.
Example:
ring s = 0, x, dp;
matrix A[100][100];
int i; int j; int r;
for (i = 1; i <= 100; i++)
{
for (j = 1; j <= 100; j++)
{
A[i, j] = random(-10, 10);
}
}
r = rank(A); r;
==> 100