H2Lib  3.0
Data Structures | Typedefs | Functions
sparsepattern

Representation of the sparsity pattern of a matrix. More...

Data Structures

struct  _sparsepattern
 Representation of the sparsity pattern of a matrix. More...
 
struct  _patentry
 Representation of one non-zero entry in a sparsepattern. More...
 

Typedefs

typedef struct _sparsepattern sparsepattern
 Representation of the sparsity pattern of a matrix.
 
typedef sparsepatternpsparsepattern
 Pointer to sparsepattern object.
 
typedef const sparsepatternpcsparsepattern
 Pointer to constant sparsepattern object.
 
typedef struct _patentry patentry
 Representation of one non-zero entry in a sparsepattern.
 
typedef patentryppatentry
 Pointer to patentry.
 
typedef const patentrypcpatentry
 Pointer to constant patentry.
 

Functions

psparsepattern new_sparsepattern (uint rows, uint cols)
 Create an empty sparsepattern object. More...
 
void del_sparsepattern (psparsepattern sp)
 Delete a sparsepattern object. More...
 
void clear_sparsepattern (psparsepattern sp)
 Remove all non-zero entries from a sparsepattern object. More...
 
void addnz_sparsepattern (psparsepattern sp, uint row, uint col)
 Add a non-zero entry to a sparsepattern object, unless it already exists. More...
 
void print_sparsepattern (pcsparsepattern sp)
 Print a sparsity pattern. More...
 

Detailed Description

Representation of the sparsity pattern of a matrix.

Function Documentation

void addnz_sparsepattern ( psparsepattern  sp,
uint  row,
uint  col 
)

Add a non-zero entry to a sparsepattern object, unless it already exists.

Parameters
spTarget sparsepattern object.
rowRow of the non-zero entry.
colColumn of the non-zero entry.
void clear_sparsepattern ( psparsepattern  sp)

Remove all non-zero entries from a sparsepattern object.

Parameters
spObject to be cleared.
void del_sparsepattern ( psparsepattern  sp)

Delete a sparsepattern object.

Releases the storage corresponding to this object.

Parameters
spObject to be deleted.
psparsepattern new_sparsepattern ( uint  rows,
uint  cols 
)

Create an empty sparsepattern object.

Parameters
rowsNumber of rows of the sparse matrix.
colsNumber of columns of the sparse matrix.
Returns
Empty sparsepattern object.
void print_sparsepattern ( pcsparsepattern  sp)

Print a sparsity pattern.

Parameters
spSource sparsity pattern.