Hex
1.0
Hydrogen-electron collision solver
|
#include <cassert>
#include <complex>
#include <cstring>
#include <iostream>
#include <vector>
#include <png++/png.hpp>
#include <umfpack.h>
#include "arrays.h"
#include "complex.h"
Go to the source code of this file.
Data Structures | |
class | RowMatrix< T > |
Dense (row-oriented) matrix. More... | |
class | ColMatrix< T > |
Dense (column-oriented) matrix. More... | |
class | DenseMatrix< T > |
DenseMatrix. More... | |
class | ColMatrix< T > |
Dense (column-oriented) matrix. More... | |
class | RowMatrix< T > |
Dense (row-oriented) matrix. More... | |
class | CscMatrix |
Complex CSC matrix. More... | |
class | CsrMatrix |
Complex CSR matrix. More... | |
class | CsrMatrix::PngGenerator |
class | CsrMatrix::LUft |
LU factorization object. More... | |
class | CooMatrix |
Complex COO matrix. More... | |
class | SymDiaMatrix |
Symmetric diagonal matrix. More... | |
Enumerations | |
enum | MatrixTriangle { none = 0, strict_lower = 1, strict_upper = 2, strict_both = 3, diagonal = 4, lower = 5, upper = 6, both = 7 } |
Matrix parts. More... | |
enum MatrixTriangle |
This enumeration contains some matrix part identificators that can be used e.g. together with matrix-vector multiplication routines (if implemented). The multiplication is done, then, as if the other parts were zero. For example
will multiply vector x
as if the diagonal of A
were zero.
Enumerator | |
---|---|
none | |
strict_lower | |
strict_upper | |
strict_both | |
diagonal | |
lower | |
upper | |
both |
CooMatrix eye | ( | size_t | N | ) |
Identity matrix.
N | Dimension. |
This routine computes the Kronecker product (“flattened tensor product”)
\[ C = A \otimes B \ , \]
where the matrix \( C \) is of size \( mn \times rs \) (for matrix \( A \) of size \( m \times r \) and matrix \( B \) of size \( n \times s \)) and defined by
\[ c_{i,j} = a_{i \,\mathrm{div}\, m, j \,\mathrm{div}\, r} \cdot b_{i \,\mathrm{mod}\, m, j \,\mathrm{mod}\, r} \]
A | First matrix |
B | Second matrix. |
Computes a sum of two csr-matrices OF THE SAME SPARSE STRUCTURE.
Computes a sum of two csc-matrices OF THE SAME SPARSE STRUCTURE.
RowMatrix<Type> operator* | ( | RowMatrix< Type > const & | A, |
ColMatrix< Type > const & | B | ||
) |
Multiplication of csr-matrix by a number.
Multiplication of csr-matrix by a number.
Multiplication of csc-matrix by a number.
Multiplication of csc-matrix by a number.
Computes product of a matrix and a complex number.
z | Number. |
B | Matrix. |
|
inline |
Computes product of a sparse matrix and a dense matrix.
A | COO-Matrix. |
B | Dense matrix (as a column-major ordered array). |
Computes product of a matrix and a complex number.
A | COO-Matrix. |
z | Number. |
SymDiaMatrix operator* | ( | SymDiaMatrix const & | A, |
SymDiaMatrix const & | B | ||
) |
SymDiaMatrix operator* | ( | double | z, |
SymDiaMatrix const & | A | ||
) |
SymDiaMatrix operator* | ( | Complex | z, |
SymDiaMatrix const & | A | ||
) |
Computes a sum of two coo-matrices.
A | COO-matrix. |
B | COO-matrix. |
SymDiaMatrix operator+ | ( | SymDiaMatrix const & | A, |
SymDiaMatrix const & | B | ||
) |
Computes a difference of two coo-matrices.
A | COO-matrix. |
B | COO-matrix. |
SymDiaMatrix operator- | ( | SymDiaMatrix const & | A, |
SymDiaMatrix const & | B | ||
) |
Computes a difference of two csr-matrices OF THE SAME SPARSE STRUCTURE.
Computes a difference of two csc-matrices OF THE SAME SPARSE STRUCTURE.
CooMatrix stairs | ( | size_t | N | ) |
Diagonal matrix with diagonal consisting of 0, 1, 2, 3, ..., N - 1.
N | Dimension. |