Paolo Orsini <[email protected]> writes:

> Hi Jed,
>
> I am back to work on this now...
>
> Thanks for explaining how I can do this. it makes perfectly sense:
>
> A. Assign entries values = 1, when forming the Adj matrix,
>
> B. Convert the Adj matrix to AIJ matrix, so I can use MatMatTransposeMult
> (or form AIJ directly): can I preallocate AIJ before calling MatConvert? To
> avoid slow performance? Is there any conflict between the preallocoation
> functions and MatConvert?

MatConvert() should be fast.

> C. Filter AIJ, to remove entries with values <3 (for 3d problems). What
> function shall I use to do this operation?

Don't try to do it in-place.  Do you want the result in a matrix or in
another data structure?  Anyway, I would just walk along calling
MatGetRow() and picking out the column indices that have values of at
least 3.

Attachment: pgppqHfmm_Mqy.pgp
Description: PGP signature

Reply via email to