Data structure using a cross-linked list to represent sparse matrices