buds  0.1
FORTRAN reference counted types
Modules
Compressed Sparse Column (CSC 0-based column pointer)

Detailed Description

A compressed sparse column matrix implementation using a 0-based column-pointer.

This only contains the indices for the sparse matrix, the data for the sparse matrix should be contained in an additional data array of the corresponding data type.

The CSC sparsity pattern stored can be sorted in each column such that the rows are consecutively aligned. This will help ensure a fast access pattern in the matrix with a column-based access pattern.

integer :: nc, nz, ic, idx
integer, pointer, contiguous :: cptr(:), row(:)
call attach(this, nr=nc, nz=nz, cptr=cptr, row=row)
do ic = 1 , nc
do idx = cptr(ic) + 1 , cptr(ic+1)
! access M(row(idx),ic)
end do
end do

There are no data-consistency checks performed (for performance reasons) hence you can end up with multiple entries for the same matrix element. In such cases the developer must take care of these.

Collaboration diagram for Compressed Sparse Column (CSC 0-based column pointer):

Modules

 Integer (int)
 integer(selected_int_kind(9)) data type
 
 Integer (long)
 integer(selected_int_kind(18)) data type