H2Lib  3.0
sparsepattern.h
Go to the documentation of this file.
1 
2 /* ------------------------------------------------------------
3  This is the file "sparsepattern.h" of the H2Lib package.
4  All rights reserved, Steffen Boerm 2012
5  ------------------------------------------------------------ */
6 
10 #ifndef SPARSEPATTERN_H
11 #define SPARSEPATTERN_H
12 
20 
23 
26 
28 typedef struct _patentry patentry;
29 
32 
34 typedef const patentry *pcpatentry;
35 
36 #include "settings.h"
37 
48 
51 };
52 
57 struct _patentry {
62 
64  struct _patentry *next;
65 };
66 
67 /* ------------------------------------------------------------ *
68  * Constructor and destructor *
69  * ------------------------------------------------------------ */
70 
78 
84 HEADER_PREFIX void
86 
87 /* ------------------------------------------------------------ *
88  * Setting up the sparsity pattern *
89  * ------------------------------------------------------------ */
90 
94 HEADER_PREFIX void
96 
103 HEADER_PREFIX void
105 
106 /* ------------------------------------------------------------ *
107  * Simple utility functions *
108  * ------------------------------------------------------------ */
109 
113 HEADER_PREFIX void
115 
118 #endif
uint cols
Number of columns.
Definition: sparsepattern.h:47
struct _patentry * next
Next entry in this row.
Definition: sparsepattern.h:64
const sparsepattern * pcsparsepattern
Pointer to constant sparsepattern object.
Definition: sparsepattern.h:25
Representation of one non-zero entry in a sparsepattern.
Definition: sparsepattern.h:57
unsigned uint
Unsigned integer type.
Definition: settings.h:70
void clear_sparsepattern(psparsepattern sp)
Remove all non-zero entries from a sparsepattern object.
uint row
Row index.
Definition: sparsepattern.h:59
psparsepattern new_sparsepattern(uint rows, uint cols)
Create an empty sparsepattern object.
void del_sparsepattern(psparsepattern sp)
Delete a sparsepattern object.
ppatentry * row
Pointers to non-zero lists for all rows.
Definition: sparsepattern.h:50
uint col
Column index.
Definition: sparsepattern.h:61
void addnz_sparsepattern(psparsepattern sp, uint row, uint col)
Add a non-zero entry to a sparsepattern object, unless it already exists.
sparsepattern * psparsepattern
Pointer to sparsepattern object.
Definition: sparsepattern.h:22
Representation of the sparsity pattern of a matrix.
Definition: sparsepattern.h:43
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
uint rows
Number of rows.
Definition: sparsepattern.h:45
void print_sparsepattern(pcsparsepattern sp)
Print a sparsity pattern.
const patentry * pcpatentry
Pointer to constant patentry.
Definition: sparsepattern.h:34
patentry * ppatentry
Pointer to patentry.
Definition: sparsepattern.h:31