Himanshu Jain on Mon, 07 Jan 2008 20:57:40 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Sparse matrices


Hi all,

I am working with large matrices >1000 * 1000 but with
only a few non-zero entries in each row. Does
PARI have any distinction between sparse and dense
matrices.

More specifically I want to compute the HNF of these
matrices. The user guide mentions the use of hnfspec/hnfadd
to reduce large sparse matrices. I looked at the code but
could not understand it well enough to use it. Any tips on
how hnfspec/hnfadd are to be used.

Another doubt:

Given a matrix M whose rank is equal to the
number of columns (for example mathnf returns
such matrices). I want to extract an invertible matrix
from M say M' and compute the inverse of M'. I also
need to know which rows were extracted from M to
get M'.

I first use indexrank to get M' and then gdiv to get
inverse(M'). Is this the most efficient way?

Thanks a lot,
Himanshu