I'm working with the PCx code and can't figure out how the Mehrotra format for matrix work. The code describing the data structure are
asked 12 Feb '13, 07:00
I have not seen the code, so this is an educated guess.
That data structure looks like a compressed row format with an extra array (pEndRow) for convenience and to minimize re-allocations due to fill-in.
See here for a simple explanation of the basic compressed row/column format.
It may be that the end pointer points to the last nonzero in that row at any given point, but that some space is left between that number and the next row start. This approach leaves some empty space in the data structure to account for fill-in (i.e., when factorization add non-zeros to the matrix).
answered 12 Feb '13, 09:40
The two most common schemes for storing sparse matrices are "Compressed Row Storage (CRS)" and "Compressed Column Storage (CCS)." This struct looks like it would be right for compressed row storage, except for the "int *Row", which would normally be "int *Col"
Whatever scheme you use there has to be some to way to implicitly or explicitly identify the row and column of each entry, and there's no place here to do that. One possibility is that the author was just sloppy in writing "int *Row" instead of "int *Col" It's also possible that this structure is only being used for symmetric matrices, and the author is using the fact that A(i,j)=A(j,i).
My advice would be to read up on CRS/CCS to understand how this scheme is commonly used and then examine the code that refers to this structure and verify what's going on. Or, you could contact the author of the code.