SparseMatrix Class Reference
#include <matrix.h>
Inherits Matrix.
Inherited by EpetraMatrix, MumpsMatrix, PardisoMatrix, PetscMatrix, and UMFPackMatrix.
List of all members.
Classes |
| struct | Page |
Public Member Functions |
| | SparseMatrix () |
| virtual | ~SparseMatrix () |
| virtual void | prealloc (int n) |
| | prepare memory
|
| virtual void | pre_add_ij (int row, int col) |
| | add indices of nonzero matrix element
|
| virtual void | finish () |
| virtual int | get_size () |
| virtual int | get_num_row_entries (int row) |
| | Return the number of entries in a specified row.
|
| virtual void | extract_row_copy (int row, int len, int &n_entries, double *vals, int *idxs) |
| | Extract the copy of a row.
|
| virtual int | get_num_col_entries (int col) |
| | Return the number of entries in a specified column.
|
| virtual void | extract_col_copy (int col, int len, int &n_entries, double *vals, int *idxs) |
| | Extract the copy of a column.
|
| virtual double | get_fill_in () const =0 |
Public Attributes |
| unsigned | row_storage:1 |
| unsigned | col_storage:1 |
Protected Member Functions |
| int | sort_and_store_indices (Page *page, int *buffer, int *max) |
| int | get_num_indices () |
Protected Attributes |
| int | size |
| Page ** | pages |
| int | mem_size |
Static Protected Attributes |
| static const int | PAGE_SIZE = 62 |
Constructor & Destructor Documentation
| SparseMatrix::SparseMatrix |
( |
|
) |
|
| SparseMatrix::~SparseMatrix |
( |
|
) |
[virtual] |
Member Function Documentation
| virtual void SparseMatrix::extract_col_copy |
( |
int |
col, |
|
|
int |
len, |
|
|
int & |
n_entries, |
|
|
double * |
vals, |
|
|
int * |
idxs | |
|
) |
| | [inline, virtual] |
Extract the copy of a column.
- Parameters:
-
| [in] | row | - global column to extract |
| [in] | len | - length of 'vals' and 'idxs' arrays. |
| [out] | n_entries | - number of nonzero entries extracted. |
| [out] | vals | - extracted values for this column. |
| [out] | idxs | - extracted global row indices for the corresponding values. |
| virtual void SparseMatrix::extract_row_copy |
( |
int |
row, |
|
|
int |
len, |
|
|
int & |
n_entries, |
|
|
double * |
vals, |
|
|
int * |
idxs | |
|
) |
| | [inline, virtual] |
Extract the copy of a row.
- Parameters:
-
| [in] | row | - global row to extract |
| [in] | len | - length of 'vals' and 'idxs' arrays. |
| [out] | n_entries | - number of nonzero entries extracted. |
| [out] | vals | - extracted values for this row. |
| [out] | idxs | - extracted global column indices for the corresponding values. |
Reimplemented in EpetraMatrix.
| virtual void SparseMatrix::finish |
( |
|
) |
[inline, virtual] |
| virtual double SparseMatrix::get_fill_in |
( |
|
) |
const [pure virtual] |
| virtual int SparseMatrix::get_num_col_entries |
( |
int |
col |
) |
[inline, virtual] |
Return the number of entries in a specified column.
- Parameters:
-
| [in] | row | - index of the column |
- Returns:
- - the number of entries in the column 'col'
| int SparseMatrix::get_num_indices |
( |
|
) |
[protected] |
| virtual int SparseMatrix::get_num_row_entries |
( |
int |
row |
) |
[inline, virtual] |
Return the number of entries in a specified row.
- Parameters:
-
| [in] | row | - index of the row |
- Returns:
- - the number of entries in the row 'row'
Reimplemented in EpetraMatrix.
| virtual int SparseMatrix::get_size |
( |
|
) |
[inline, virtual] |
| void SparseMatrix::pre_add_ij |
( |
int |
row, |
|
|
int |
col | |
|
) |
| | [virtual] |
add indices of nonzero matrix element
- Parameters:
-
| [in] | row | - row index |
| [in] | col | - column index |
Reimplemented in EpetraMatrix, and PardisoMatrix.
| void SparseMatrix::prealloc |
( |
int |
n |
) |
[virtual] |
prepare memory
- Parameters:
-
| [in] | ndofs | - number of unknowns |
Reimplemented in EpetraMatrix.
| int SparseMatrix::sort_and_store_indices |
( |
Page * |
page, |
|
|
int * |
buffer, |
|
|
int * |
max | |
|
) |
| | [protected] |
Member Data Documentation
The documentation for this class was generated from the following files: