Is it possible to ask for element (i,j) in CSparse cs object and get its value or zero if it is not filled? Should I write this function by myself or there is a solution in CSparse?
Lack of documentation made me sad.
Here is the reference from code:
Timothy Davis,
Direct Methods for Sparse Linear Systems,
SIAM, Philadelphia, 2006.
Here is the source
You’re right. The documentation is poor. Let us see if we cannot generate some rough documentation of our own.
Copying the directory
http://www.cise.ufl.edu/research/sparse/CSparse/CSparse/Source/to one’s own PC, entering the directory, and issuing the commandsed '/^[^[:space:]#{}]/!d;/^\//!a\\' *.cyieldsDo you notice anything there that looks as though it would do what you want? I don’t. Based on the above, the function
cs_print()seems a more likely candidate than most of the others. However, when I look at thecs_print()source, I don’t seem to see what you want. Instead I see a routine that seems to treat nonzero elements only.