monolish
0.17.3-dev.16
MONOlithic LInear equation Solvers for Highly-parallel architecture
|
Generate test data. More...
Functions | |
template<typename T > | |
matrix::COO< T > | monolish::util::asym_band_matrix (const int M, const int N, const int W, const T diag_val, const T Uval, const T Lval) |
create asymmetric band matrix More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::band_matrix (const int M, const int N, const int W, const T diag_val, const T val) |
create band matrix More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::eye (const int M) |
create band matrix More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::frank_matrix (const int &M) |
create Frank matrix More... | |
template<typename T > | |
T | monolish::util::frank_matrix_eigenvalue (const int &M, const int &N) |
Nth eigenvalue from the bottom of MxM Frank matrix. More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::laplacian_matrix_1D (const int &M) |
create 1D Laplacian matrix More... | |
template<typename T > | |
T | monolish::util::laplacian_matrix_1D_eigenvalue (const int &M, int N) |
Nth smallest eigenvalue of 1D Laplacian matrix. More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::laplacian_matrix_2D_5p (const int M, const int N) |
create two dimensional Laplacian matrix using the five point central difference scheme More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::random_structure_matrix (const int M, const int N, const int nnzrow, const T val) |
create random structure matrix (column number is decided by random) More... | |
template<typename T > | |
tensor::tensor_COO< T > | monolish::util::random_structure_tensor (const size_t K, const size_t M, const size_t N, const size_t L, const size_t nnzrow, const T val) |
create random structure tensor (index is decided by random) More... | |
template<typename T > | |
tensor::tensor_COO< T > | monolish::util::random_structure_tensor (const size_t M, const size_t N, const size_t L, const size_t nnzrow, const T val) |
create random structure tensor (index is decided by random) More... | |
template<typename T > | |
tensor::tensor_COO< T > | monolish::util::random_structure_tensor (const size_t M, const size_t N, const size_t nnzrow, const T val) |
create random structure tensor (index is decided by random) More... | |
template<typename T > | |
void | monolish::util::random_vector (vector< T > &vec, const T min, const T max) |
create random vector More... | |
template<typename T > | |
void | monolish::util::random_vector (vector< T > &vec, const T min, const T max, const std::uint32_t seed) |
create random vector with random seed More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::toeplitz_plus_hankel_matrix (const int &M, T a0, T a1, T a2) |
create Toeplitz-plus-Hankel matrix More... | |
template<typename T > | |
T | monolish::util::toeplitz_plus_hankel_matrix_eigenvalue (const int &M, int N, T a0, T a1, T a2, T b0, T b1, T b2) |
Nth smallest eigenvalue of GEVP Ax=lBx of Toeplitz-plus-Hankel matrixes A, B. More... | |
template<typename T > | |
matrix::COO< T > | monolish::util::tridiagonal_toeplitz_matrix (const int &M, T a, T b) |
create tridiagonal Toeplitz matrix More... | |
template<typename T > | |
T | monolish::util::tridiagonal_toeplitz_matrix_eigenvalue (const int &M, int N, T a, T b) |
Nth smallest eigenvalue of MxM tridiagonal Toeplitz matrix. More... | |
Generate test data.
matrix::COO<T> monolish::util::asym_band_matrix | ( | const int | M, |
const int | N, | ||
const int | W, | ||
const T | diag_val, | ||
const T | Uval, | ||
const T | Lval | ||
) |
create asymmetric band matrix
M | # of Row |
N | # of col. |
W | half-bandwidth (bandwidth is 2*W+1) |
diag_val | value of diagonal elements |
Uval | value of upper non-diagonal elements |
Lval | value of lower non-diagonal elements |
matrix::COO<T> monolish::util::band_matrix | ( | const int | M, |
const int | N, | ||
const int | W, | ||
const T | diag_val, | ||
const T | val | ||
) |
create band matrix
M | # of Row |
N | # of col. |
W | half-bandwidth (bandwidth is 2*W+1) |
diag_val | value of diagonal elements |
val | value of non-diagonal elements |
matrix::COO<T> monolish::util::eye | ( | const int | M | ) |
create band matrix
M | # of Row and col. |
matrix::COO<T> monolish::util::frank_matrix | ( | const int & | M | ) |
create Frank matrix
M | # of row and col |
T monolish::util::frank_matrix_eigenvalue | ( | const int & | M, |
const int & | N | ||
) |
Nth eigenvalue from the bottom of MxM Frank matrix.
M | dimension of Frank matrix |
N | #-th eigenvalue from the bottom |
matrix::COO<T> monolish::util::laplacian_matrix_1D | ( | const int & | M | ) |
create 1D Laplacian matrix
M | # of row and col |
T monolish::util::laplacian_matrix_1D_eigenvalue | ( | const int & | M, |
int | N | ||
) |
Nth smallest eigenvalue of 1D Laplacian matrix.
M | dimension of tridiagonal Toeplitz matrix |
N | #-th eigenvalue from the bottom |
matrix::COO<T> monolish::util::laplacian_matrix_2D_5p | ( | const int | M, |
const int | N | ||
) |
create two dimensional Laplacian matrix using the five point central difference scheme
M | # of grid point |
N | # of grid point |
matrix::COO<T> monolish::util::random_structure_matrix | ( | const int | M, |
const int | N, | ||
const int | nnzrow, | ||
const T | val | ||
) |
create random structure matrix (column number is decided by random)
M | # of Row |
N | # of col. |
nnzrow | non-zero elements per row |
val | value of elements |
tensor::tensor_COO<T> monolish::util::random_structure_tensor | ( | const size_t | K, |
const size_t | M, | ||
const size_t | N, | ||
const size_t | L, | ||
const size_t | nnzrow, | ||
const T | val | ||
) |
create random structure tensor (index is decided by random)
M | # of shape 1 |
N | # of shape 2 |
L | # of shape 3 |
nnzrow | non-zero elements per row |
val | value of elements |
tensor::tensor_COO<T> monolish::util::random_structure_tensor | ( | const size_t | M, |
const size_t | N, | ||
const size_t | L, | ||
const size_t | nnzrow, | ||
const T | val | ||
) |
create random structure tensor (index is decided by random)
M | # of shape 1 |
N | # of shape 2 |
L | # of shape 3 |
nnzrow | non-zero elements per row |
val | value of elements |
tensor::tensor_COO<T> monolish::util::random_structure_tensor | ( | const size_t | M, |
const size_t | N, | ||
const size_t | nnzrow, | ||
const T | val | ||
) |
create random structure tensor (index is decided by random)
M | # of shape 1 |
N | # of shape 2 |
nnzrow | non-zero elements per row |
val | value of elements |
void monolish::util::random_vector | ( | vector< T > & | vec, |
const T | min, | ||
const T | max | ||
) |
create random vector
vec | allocated vector |
min | min. of random |
max | min. of random |
void monolish::util::random_vector | ( | vector< T > & | vec, |
const T | min, | ||
const T | max, | ||
const std::uint32_t | seed | ||
) |
create random vector with random seed
vec | allocated vector |
min | min. of random |
max | min. of random |
seed | random seed |
matrix::COO<T> monolish::util::toeplitz_plus_hankel_matrix | ( | const int & | M, |
T | a0, | ||
T | a1, | ||
T | a2 | ||
) |
create Toeplitz-plus-Hankel matrix
M | # of row and col |
a0 | value of diagonal elements |
a1 | value of next-to-diagonal elements |
a2 | value of second-next-to-diagonal elements |
T monolish::util::toeplitz_plus_hankel_matrix_eigenvalue | ( | const int & | M, |
int | N, | ||
T | a0, | ||
T | a1, | ||
T | a2, | ||
T | b0, | ||
T | b1, | ||
T | b2 | ||
) |
Nth smallest eigenvalue of GEVP Ax=lBx of Toeplitz-plus-Hankel matrixes A, B.
M | dimension of Toeplitz-plus-Hankel marices |
N | #-th eigenvalue from the bottom |
a0,a1,a2 | value of Toeplitz-plus-Hankel matrix A |
b0,b1,b2 | value of TOeplitz-plus-Hankel matrix B |
matrix::COO<T> monolish::util::tridiagonal_toeplitz_matrix | ( | const int & | M, |
T | a, | ||
T | b | ||
) |
create tridiagonal Toeplitz matrix
M | # of row and col |
a | value of diagonal elements |
b | value of next-to-diagonal elements |
T monolish::util::tridiagonal_toeplitz_matrix_eigenvalue | ( | const int & | M, |
int | N, | ||
T | a, | ||
T | b | ||
) |
Nth smallest eigenvalue of MxM tridiagonal Toeplitz matrix.
M | dimension of tridiagonal Toeplitz matrix |
N | #-th eigenvalue from the bottom |
a | value of diagonal elements |
b | value of next-to-diagonal elements |