![]() |
Hex
1.0
Hydrogen-electron collision solver
|
#include <algorithm>#include <complex>#include <cstdio>#include <cstring>#include <set>#include <vector>#include <png++/png.hpp>#include <umfpack.h>#include "hdffile.h"#include "arrays.h"#include "matrix.h"#include "misc.h"
Functions | |
| double | SuiteSparse_time () |
| template<> | |
| RowMatrix< double > | operator* (RowMatrix< double > const &A, ColMatrix< double > const &B) |
| CooMatrix | kron (const CooMatrix &A, const CooMatrix &B) |
| Kronecker product. More... | |
| CooMatrix | eye (size_t N) |
| CooMatrix | stairs (size_t N) |
| Complex | sparse_row_scalar_product (int n1, Complex const *const restrict x1, long const *const restrict i1, int n2, Complex const *const restrict x2, long const *const restrict i2) |
| CsrMatrix | operator* (CsrMatrix const &A, CscMatrix const &B) |
| SymDiaMatrix | operator+ (SymDiaMatrix const &A, SymDiaMatrix const &B) |
| SymDiaMatrix | operator- (SymDiaMatrix const &A, SymDiaMatrix const &B) |
| SymDiaMatrix | operator* (double z, SymDiaMatrix const &A) |
| SymDiaMatrix | operator* (Complex z, SymDiaMatrix const &A) |
| SymDiaMatrix | operator* (SymDiaMatrix const &A, SymDiaMatrix const &B) |
| std::ostream & | operator<< (std::ostream &out, SymDiaMatrix const &A) |
| 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. |
| RowMatrix<double> operator* | ( | RowMatrix< double > const & | A, |
| ColMatrix< double > const & | B | ||
| ) |
| SymDiaMatrix operator* | ( | double | z, |
| SymDiaMatrix const & | A | ||
| ) |
| SymDiaMatrix operator* | ( | Complex | z, |
| SymDiaMatrix const & | A | ||
| ) |
| SymDiaMatrix operator* | ( | SymDiaMatrix const & | A, |
| SymDiaMatrix const & | B | ||
| ) |
| SymDiaMatrix operator+ | ( | SymDiaMatrix const & | A, |
| SymDiaMatrix const & | B | ||
| ) |
| SymDiaMatrix operator- | ( | SymDiaMatrix const & | A, |
| SymDiaMatrix const & | B | ||
| ) |
| std::ostream& operator<< | ( | std::ostream & | out, |
| SymDiaMatrix const & | A | ||
| ) |
| Complex sparse_row_scalar_product | ( | int | n1, |
| Complex const *const restrict | x1, | ||
| long const *const restrict | i1, | ||
| int | n2, | ||
| Complex const *const restrict | x2, | ||
| long const *const restrict | i2 | ||
| ) |
| CooMatrix stairs | ( | size_t | N | ) |
Diagonal matrix with diagonal consisting of 0, 1, 2, 3, ..., N - 1.
| N | Dimension. |
| double SuiteSparse_time | ( | ) |
1.8.5