Matrix_lsc Interface

public interface Matrix_lsc

Contents


Module Procedures

private pure function ConstructEmptyMatrix_lsc(rows, columns, zero_in) result(this)

Create a sparse matrix with a certain number of columns and rows. Will allocate storage for the outer values, nothing else unless you set zero_in to true.

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: rows

The number of matrix rows.

integer, intent(in) :: columns

The number of matrix columns.

logical, intent(in), optional :: zero_in

Whether to set the matrix to zero.

Return Value type(Matrix_lsc)

The matrix to construct.

private function ConstructMatrixFromFile_lsc(file_name) result(this)

Create a sparse matrix by reading in a matrix market file.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: file_name

Name of the file.

Return Value type(Matrix_lsc)

The matrix being constructed.

private pure function ConstructMatrixFromTripletList_lsc(triplet_list, rows, columns) result(this)

Construct a sparse matrix from a \b SORTED triplet list. The triplet list must be sorted to efficiently fill in the matrix. This constructor assumes \b you have already sorted the triplet list.

Arguments

Type IntentOptional AttributesName
type(TripletList_c), intent(in) :: triplet_list

A list of triplet values. They must be sorted.

integer, intent(in) :: rows

Number of matrix rows

integer, intent(in) :: columns

Number of matrix columns

Return Value type(Matrix_lsc)

The matrix being constructed