GammaLib 2.1.0.dev
|
Sparse matrix class implementation. More...
#include <cmath>
#include "GException.hpp"
#include "GTools.hpp"
#include "GVector.hpp"
#include "GVectorSparse.hpp"
#include "GMatrix.hpp"
#include "GMatrixSparse.hpp"
#include "GMatrixSymmetric.hpp"
#include "GSparseSymbolic.hpp"
#include "GSparseNumeric.hpp"
Go to the source code of this file.
Macros | |
#define | G_CONSTRUCTOR "GMatrixSparse::GMatrixSparse(int&, int&, int&)" |
#define | G_OP_MUL_VEC "GMatrixSparse::operator*(GVector&)" |
#define | G_OP_ADD "GMatrixSparse::operator+=(GMatrixSparse&)" |
#define | G_OP_SUB "GMatrixSparse::operator-=(GMatrixSparse&)" |
#define | G_OP_MAT_MUL "GMatrixSparse::operator*=(GMatrixSparse&)" |
#define | G_AT "GMatrixSparse::at(int&, int&)" |
#define | G_EXTRACT_ROW "GMatrixSparse::row(int&)" |
#define | G_SET_ROW "GMatrixSparse::row(int&, GVector&)" |
#define | G_EXTRACT_COLUMN "GMatrixSparse::column(int&)" |
#define | G_SET_COLUMN "GMatrixSparse::column(int&, GVector&)" |
#define | G_SET_COLUMN2 "GMatrixSparse::column(int&, double*, int*, int)" |
#define | G_ADD_TO_COLUMN1 "GMatrixSparse::add_to_column(int&, GVector&)" |
#define | G_ADD_TO_COLUMN2 |
#define | G_ADD_TO_COLUMN3 |
#define | G_MULTIPLY_COLUMN "GMatrixSparse::multiply_column(int&, GVector&)" |
#define | G_CHOL_DECOMP "GMatrixSparse::cholesky_decompose(bool)" |
#define | G_CHOL_SOLVE "GMatrixSparse::cholesky_solver(GVector&, bool)" |
#define | G_STACK_INIT "GMatrixSparse::stack_init(int&, int&)" |
#define | G_STACK_PUSH1 "GMatrixSparse::stack_push_column(GVector&, int&)" |
#define | G_STACK_PUSH2 |
#define | G_STACK_FLUSH "GMatrixSparse::stack_flush(void)" |
#define | G_COLUMN_TO_VECTOR1 "GMatrixSparse::column_to_vector(int&, GVector*)" |
#define | G_COLUMN_TO_VECTOR2 |
#define | G_COLFILL_SET_COLUMN |
#define | G_COLFILL_FLUSH "GMatrixSparse::colfill_flush()" |
#define | G_COPY_MEMBERS "GMatrixSparse::copy_members(GMatrixSparse&)" |
#define | G_ALLOC_MEMBERS "GMatrixSparse::alloc_members(int&, int&, int&)" |
#define | G_GET_INDEX "GMatrixSparse::get_index(int&, int&)" |
#define | G_ALLOC "GMatrixSparse::alloc_elements(int&, int&)" |
#define | G_FREE "GMatrixSparse::free_elements(int&, int&)" |
#define | G_REMOVE_ZERO "GMatrixSparse::remove_zero_row_col(void)" |
#define | G_INSERT_ROW "GMatrixSparse::insert_row(int&, GVector&, bool&)" |
#define | G_SYMPERM "cs_symperm(GMatrixSparse*, int*, int&)" |
#define | G_TRANSPOSE "cs_transpose(GMatrixSparse*, int)" |
#define | G_MIN(a, b) (((a) < (b)) ? (a) : (b)) |
#define | G_MAX(a, b) (((a) > (b)) ? (a) : (b)) |
Functions | |
GMatrixSparse | cs_symperm (const GMatrixSparse &matrix, const int *pinv) |
cs_symperm | |
GMatrixSparse | cs_transpose (const GMatrixSparse &matrix, int values) |
double | cs_cumsum (int *p, int *c, int n) |
cs_cumsum | |
Sparse matrix class implementation.
Definition in file GMatrixSparse.cpp.
#define G_ADD_TO_COLUMN1 "GMatrixSparse::add_to_column(int&, GVector&)" |
Definition at line 54 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::add_to_column().
#define G_ADD_TO_COLUMN2 |
Definition at line 55 of file GMatrixSparse.cpp.
#define G_ADD_TO_COLUMN3 |
Definition at line 57 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::add_to_column().
#define G_ALLOC "GMatrixSparse::alloc_elements(int&, int&)" |
Definition at line 76 of file GMatrixSparse.cpp.
Referenced by GCTAModelSpatialRegistry::alloc(), GModelSpatialRegistry::alloc(), GModelSpectralRegistry::alloc(), and GModelTemporalRegistry::alloc().
#define G_ALLOC_MEMBERS "GMatrixSparse::alloc_members(int&, int&, int&)" |
Definition at line 74 of file GMatrixSparse.cpp.
Referenced by GMatrixSymmetric::alloc_members().
#define G_AT "GMatrixSparse::at(int&, int&)" |
Definition at line 48 of file GMatrixSparse.cpp.
#define G_CHOL_DECOMP "GMatrixSparse::cholesky_decompose(bool)" |
Definition at line 60 of file GMatrixSparse.cpp.
Referenced by GMatrixSymmetric::cholesky_decompose().
#define G_CHOL_SOLVE "GMatrixSparse::cholesky_solver(GVector&, bool)" |
Definition at line 61 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::cholesky_solver(), and GMatrixSymmetric::cholesky_solver().
#define G_COLFILL_FLUSH "GMatrixSparse::colfill_flush()" |
Definition at line 72 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::colfill_flush().
#define G_COLFILL_SET_COLUMN |
Definition at line 70 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::colfill_set_column(), and GMatrixSparse::colfill_set_column().
#define G_COLUMN_TO_VECTOR1 "GMatrixSparse::column_to_vector(int&, GVector*)" |
Definition at line 67 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::column_to_vector().
#define G_COLUMN_TO_VECTOR2 |
Definition at line 68 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::column_to_vector().
#define G_CONSTRUCTOR "GMatrixSparse::GMatrixSparse(int&, int&, int&)" |
Definition at line 43 of file GMatrixSparse.cpp.
#define G_COPY_MEMBERS "GMatrixSparse::copy_members(GMatrixSparse&)" |
Definition at line 73 of file GMatrixSparse.cpp.
#define G_EXTRACT_COLUMN "GMatrixSparse::column(int&)" |
Definition at line 51 of file GMatrixSparse.cpp.
#define G_EXTRACT_ROW "GMatrixSparse::row(int&)" |
Definition at line 49 of file GMatrixSparse.cpp.
#define G_FREE "GMatrixSparse::free_elements(int&, int&)" |
Definition at line 77 of file GMatrixSparse.cpp.
#define G_GET_INDEX "GMatrixSparse::get_index(int&, int&)" |
Definition at line 75 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::get_index().
#define G_INSERT_ROW "GMatrixSparse::insert_row(int&, GVector&, bool&)" |
Definition at line 79 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::insert_row().
#define G_MAX | ( | a, | |
b ) (((a) > (b)) ? (a) : (b)) |
Definition at line 85 of file GMatrixSparse.cpp.
Referenced by GOptimizerPar::max().
#define G_MIN | ( | a, | |
b ) (((a) < (b)) ? (a) : (b)) |
Definition at line 84 of file GMatrixSparse.cpp.
Referenced by GOptimizerPar::min().
#define G_MULTIPLY_COLUMN "GMatrixSparse::multiply_column(int&, GVector&)" |
Definition at line 59 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::multiply_column().
#define G_OP_ADD "GMatrixSparse::operator+=(GMatrixSparse&)" |
Definition at line 45 of file GMatrixSparse.cpp.
#define G_OP_MAT_MUL "GMatrixSparse::operator*=(GMatrixSparse&)" |
Definition at line 47 of file GMatrixSparse.cpp.
#define G_OP_MUL_VEC "GMatrixSparse::operator*(GVector&)" |
Definition at line 44 of file GMatrixSparse.cpp.
#define G_OP_SUB "GMatrixSparse::operator-=(GMatrixSparse&)" |
Definition at line 46 of file GMatrixSparse.cpp.
#define G_REMOVE_ZERO "GMatrixSparse::remove_zero_row_col(void)" |
Definition at line 78 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::remove_zero_row_col().
#define G_SET_COLUMN "GMatrixSparse::column(int&, GVector&)" |
Definition at line 52 of file GMatrixSparse.cpp.
#define G_SET_COLUMN2 "GMatrixSparse::column(int&, double*, int*, int)" |
Definition at line 53 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::column().
#define G_SET_ROW "GMatrixSparse::row(int&, GVector&)" |
Definition at line 50 of file GMatrixSparse.cpp.
#define G_STACK_FLUSH "GMatrixSparse::stack_flush(void)" |
Definition at line 66 of file GMatrixSparse.cpp.
#define G_STACK_INIT "GMatrixSparse::stack_init(int&, int&)" |
Definition at line 62 of file GMatrixSparse.cpp.
#define G_STACK_PUSH1 "GMatrixSparse::stack_push_column(GVector&, int&)" |
Definition at line 63 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::stack_push_column().
#define G_STACK_PUSH2 |
Definition at line 64 of file GMatrixSparse.cpp.
Referenced by GMatrixSparse::stack_push_column().
#define G_SYMPERM "cs_symperm(GMatrixSparse*, int*, int&)" |
Definition at line 80 of file GMatrixSparse.cpp.
#define G_TRANSPOSE "cs_transpose(GMatrixSparse*, int)" |
Definition at line 81 of file GMatrixSparse.cpp.
double cs_cumsum | ( | int * | p, |
int * | c, | ||
int | n ) |
cs_cumsum
[out] | p | Integer array (n+1 elements). |
[in] | c | Integer array (n elements). |
[in] | n | Number of elements. |
Evaluate p[0..n] = cumulative sum of c[0..n-1]
Definition at line 4740 of file GMatrixSparse.cpp.
Referenced by GSparseSymbolic::cholesky_symbolic_analysis().
GMatrixSparse cs_symperm | ( | const GMatrixSparse & | matrix, |
const int * | pinv ) |
cs_symperm
[in] | matrix | Matrix. |
[in] | pinv | TBD. |
Returns matrix(p,p) where matrix and matrix(p,p) are symmetric the upper part stored.
Definition at line 4587 of file GMatrixSparse.cpp.
Referenced by GSparseNumeric::cholesky_numeric_analysis(), and GSparseSymbolic::cholesky_symbolic_analysis().
GMatrixSparse cs_transpose | ( | const GMatrixSparse & | matrix, |
int | values ) |
Definition at line 4673 of file GMatrixSparse.cpp.
Referenced by GSparseSymbolic::cs_amd(), and GSparseSymbolic::cs_counts().