NTPoly
Data Types | Functions/Subroutines
sparsematrixiteratormodule Module Reference

A module for an iterator that allows one to easily iterate over elements. More...

Data Types

type  sparsematrixiterator_t
 A datatype for iterating over a CSR matrix. More...
 

Functions/Subroutines

pure subroutine, public start (this, sparse_matrix)
 Associates an iterator with a given matrix and points it to first element. More...
 
pure subroutine, public next (this, sparse_matrix)
 Gets the next element in a sparse matrix. More...
 

Detailed Description

A module for an iterator that allows one to easily iterate over elements.

Function/Subroutine Documentation

◆ next()

pure subroutine, public sparsematrixiteratormodule::next ( type(sparsematrixiterator_t), intent(inout)  this,
type(sparsematrix_t), intent(in)  sparse_matrix 
)

Gets the next element in a sparse matrix.

Parameters
[in,out]thisthe sparse matrix iterator.
[in]sparse_matrixthe sparse matrix associated with the iterator.
Todo:
it's probably a pain to have to pass the sparse matrix here. But Fortran's requirement that everything that is pointed to has the TARGET attribute is problematic.

◆ start()

pure subroutine, public sparsematrixiteratormodule::start ( type(sparsematrixiterator_t), intent(inout)  this,
type(sparsematrix_t), intent(in)  sparse_matrix 
)

Associates an iterator with a given matrix and points it to first element.

Parameters
[in,out]thisthe iterator to associate.
[in]sparse_matrixthe matrix to associate it with.