![]() |
Multiscale Universal Interface
2.0
A Concurrent Framework for Coupling Heterogeneous Solvers
|
#include <matrix.h>
Public Member Functions | |
| sparse_matrix (ITYPE, ITYPE, const std::string &="CSR", const std::vector< VTYPE > &={}, const std::vector< ITYPE > &={}, const std::vector< ITYPE > &={}) | |
| sparse_matrix (const std::string &="CSR") | |
| sparse_matrix (const sparse_matrix< ITYPE, VTYPE > &) | |
| sparse_matrix (const std::vector< std::vector< VTYPE >> &, const std::string &="CSR") | |
| sparse_matrix (ITYPE, const std::string &={}, const std::string &="CSR") | |
| ~sparse_matrix () | |
| void | print () const |
| void | print_vectors () const |
| void | write_vectors_to_file (const std::string &, const std::string &={}, const std::string &={}, const std::string &={}) const |
| void | read_vectors_from_file (const std::string &, const std::string &={}, const std::string &={}, const std::string &={}) |
| VTYPE | get_value (ITYPE, ITYPE) const |
| ITYPE | get_rows () const |
| ITYPE | get_cols () const |
| std::vector< std::pair< ITYPE, ITYPE > > | get_non_zero_elements () const |
| ITYPE | non_zero_elements_count () const |
| bool | empty () const |
| std::string | get_format () const |
| bool | is_sorted_unique (const std::string &={}, const std::string &={}) const |
| void | resize (ITYPE, ITYPE) |
| void | copy (const sparse_matrix< ITYPE, VTYPE > &) |
| sparse_matrix< ITYPE, VTYPE > | segment (ITYPE, ITYPE, ITYPE, ITYPE, bool=true) |
| void | set_value (ITYPE, ITYPE, VTYPE, bool=true) |
| void | set_value (VTYPE) |
| void | swap_elements (ITYPE, ITYPE, ITYPE, ITYPE) |
| void | set_zero () |
| void | add_scalar (ITYPE, ITYPE, VTYPE, bool=true) |
| void | subtract_scalar (ITYPE, ITYPE, VTYPE, bool=true) |
| void | multiply_scalar (ITYPE, ITYPE, VTYPE, bool=true) |
| sparse_matrix< ITYPE, VTYPE > & | operator= (const sparse_matrix< ITYPE, VTYPE > &) |
| void | format_conversion (const std::string &="COO", bool=true, bool=false, const std::string &="overwrite") |
| void | sort_deduplication (bool=true, bool=true, const std::string &="overwrite", bool=true) |
| sparse_matrix< ITYPE, VTYPE > | operator+ (sparse_matrix< ITYPE, VTYPE > &) |
| sparse_matrix< ITYPE, VTYPE > | operator- (sparse_matrix< ITYPE, VTYPE > &) |
| sparse_matrix< ITYPE, VTYPE > | operator* (sparse_matrix< ITYPE, VTYPE > &) |
| template<typename STYPE > | |
| sparse_matrix< ITYPE, VTYPE > | operator* (const STYPE &) const |
| VTYPE | dot_product (sparse_matrix< ITYPE, VTYPE > &) const |
| sparse_matrix< ITYPE, VTYPE > | hadamard_product (sparse_matrix< ITYPE, VTYPE > &) |
| sparse_matrix< ITYPE, VTYPE > | transpose (bool=true) const |
| void | lu_decomposition (sparse_matrix< ITYPE, VTYPE > &, sparse_matrix< ITYPE, VTYPE > &) const |
| void | qr_decomposition (sparse_matrix< ITYPE, VTYPE > &, sparse_matrix< ITYPE, VTYPE > &) const |
| sparse_matrix< ITYPE, VTYPE > | inverse () const |
Protected Member Functions | |
| void | set_matrix_format (const std::string &="CSR") |
| bool | is_coo_sorted_unique (const std::string &={}, const std::string &={}) const |
| bool | is_csr_sorted_unique (const std::string &={}, const std::string &={}) const |
| bool | is_csc_sorted_unique (const std::string &={}, const std::string &={}) const |
| void | sort_coo (bool=true, bool=false, const std::string &="overwrite") |
| void | sort_csr (bool=false, const std::string &="overwrite") |
| void | sort_csc (bool=false, const std::string &="overwrite") |
| void | coo_element_operation (ITYPE, ITYPE, VTYPE, const std::string &, const std::string &={}, const std::string &={}) |
| void | csr_element_operation (ITYPE, ITYPE, VTYPE, const std::string &, const std::string &={}, const std::string &={}) |
| void | csc_element_operation (ITYPE, ITYPE, VTYPE, const std::string &, const std::string &={}, const std::string &={}) |
| void | coo_to_csr () |
| void | coo_to_csc () |
| void | csr_to_coo () |
| void | csr_to_csc () |
| void | csc_to_coo () |
| void | csc_to_csr () |
| void | clear_vectors () |
| void | index_reinterpretation () |
| void | format_reinterpretation () |
| void | assert_valid_vector_size (const std::string &={}, const std::string &={}) const |
| void | assert_coo_sorted_unique (const std::string &={}, const std::string &={}) const |
| void | assert_csr_sorted_unique (const std::string &={}, const std::string &={}) const |
| void | assert_csc_sorted_unique (const std::string &={}, const std::string &={}) const |
| mui::linalg::sparse_matrix< ITYPE, VTYPE >::sparse_matrix | ( | ITYPE | r, |
| ITYPE | c, | ||
| const std::string & | format = "CSR", |
||
| const std::vector< VTYPE > & | value_vector = {}, |
||
| const std::vector< ITYPE > & | row_vector = {}, |
||
| const std::vector< ITYPE > & | column_vector = {} |
||
| ) |
| mui::linalg::sparse_matrix< ITYPE, VTYPE >::sparse_matrix | ( | const std::string & | format = "CSR" | ) |
| mui::linalg::sparse_matrix< ITYPE, VTYPE >::sparse_matrix | ( | const sparse_matrix< ITYPE, VTYPE > & | exist_mat | ) |
| mui::linalg::sparse_matrix< ITYPE, VTYPE >::sparse_matrix | ( | const std::vector< std::vector< VTYPE >> & | denseVector, |
| const std::string & | format = "CSR" |
||
| ) |
| mui::linalg::sparse_matrix< ITYPE, VTYPE >::sparse_matrix | ( | ITYPE | n, |
| const std::string & | token = {}, |
||
| const std::string & | format = "CSR" |
||
| ) |
| mui::linalg::sparse_matrix< ITYPE, VTYPE >::~sparse_matrix< ITYPE, VTYPE > |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::add_scalar | ( | ITYPE | r, |
| ITYPE | c, | ||
| VTYPE | val, | ||
| bool | performSortAndUniqueCheck = true |
||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::copy | ( | const sparse_matrix< ITYPE, VTYPE > & | exist_mat | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| VTYPE mui::linalg::sparse_matrix< ITYPE, VTYPE >::dot_product | ( | sparse_matrix< ITYPE, VTYPE > & | exist_mat | ) | const |
| bool mui::linalg::sparse_matrix< ITYPE, VTYPE >::empty |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::format_conversion | ( | const std::string & | format = "COO", |
| bool | performSortAndUniqueCheck = true, |
||
| bool | deduplication = false, |
||
| const std::string & | deduplication_mode = "overwrite" |
||
| ) |
|
protected |
| ITYPE mui::linalg::sparse_matrix< ITYPE, VTYPE >::get_cols |
| std::string mui::linalg::sparse_matrix< ITYPE, VTYPE >::get_format |
| std::vector< std::pair< ITYPE, ITYPE > > mui::linalg::sparse_matrix< ITYPE, VTYPE >::get_non_zero_elements |
| ITYPE mui::linalg::sparse_matrix< ITYPE, VTYPE >::get_rows |
| VTYPE mui::linalg::sparse_matrix< ITYPE, VTYPE >::get_value | ( | ITYPE | r, |
| ITYPE | c | ||
| ) | const |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::hadamard_product | ( | sparse_matrix< ITYPE, VTYPE > & | exist_mat | ) |
|
protected |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::inverse |
|
protected |
|
protected |
|
protected |
| bool mui::linalg::sparse_matrix< ITYPE, VTYPE >::is_sorted_unique | ( | const std::string & | file_name_input = {}, |
| const std::string & | function_name_input = {} |
||
| ) | const |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::lu_decomposition | ( | sparse_matrix< ITYPE, VTYPE > & | L, |
| sparse_matrix< ITYPE, VTYPE > & | U | ||
| ) | const |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::multiply_scalar | ( | ITYPE | r, |
| ITYPE | c, | ||
| VTYPE | val, | ||
| bool | performSortAndUniqueCheck = true |
||
| ) |
| ITYPE mui::linalg::sparse_matrix< ITYPE, VTYPE >::non_zero_elements_count |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::operator* | ( | const STYPE & | scalar | ) | const |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::operator* | ( | sparse_matrix< ITYPE, VTYPE > & | multiplicand | ) |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::operator+ | ( | sparse_matrix< ITYPE, VTYPE > & | addend | ) |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::operator- | ( | sparse_matrix< ITYPE, VTYPE > & | subtrahend | ) |
| sparse_matrix< ITYPE, VTYPE > & mui::linalg::sparse_matrix< ITYPE, VTYPE >::operator= | ( | const sparse_matrix< ITYPE, VTYPE > & | exist_mat | ) |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::print |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::print_vectors |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::qr_decomposition | ( | sparse_matrix< ITYPE, VTYPE > & | Q, |
| sparse_matrix< ITYPE, VTYPE > & | R | ||
| ) | const |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::read_vectors_from_file | ( | const std::string & | format_file_name, |
| const std::string & | val_file_name = {}, |
||
| const std::string & | row_file_name = {}, |
||
| const std::string & | col_file_name = {} |
||
| ) |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::resize | ( | ITYPE | r, |
| ITYPE | c | ||
| ) |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::segment | ( | ITYPE | r_start, |
| ITYPE | r_end, | ||
| ITYPE | c_start, | ||
| ITYPE | c_end, | ||
| bool | performSortAndUniqueCheck = true |
||
| ) |
|
protected |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::set_value | ( | ITYPE | r, |
| ITYPE | c, | ||
| VTYPE | val, | ||
| bool | performSortAndUniqueCheck = true |
||
| ) |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::set_value | ( | VTYPE | val | ) |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::set_zero |
|
protected |
|
protected |
|
protected |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::sort_deduplication | ( | bool | check_sorted_unique = true, |
| bool | deduplication = true, |
||
| const std::string & | deduplication_mode = "overwrite", |
||
| bool | is_row_major = true |
||
| ) |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::subtract_scalar | ( | ITYPE | r, |
| ITYPE | c, | ||
| VTYPE | val, | ||
| bool | performSortAndUniqueCheck = true |
||
| ) |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::swap_elements | ( | ITYPE | r1, |
| ITYPE | c1, | ||
| ITYPE | r2, | ||
| ITYPE | c2 | ||
| ) |
| sparse_matrix< ITYPE, VTYPE > mui::linalg::sparse_matrix< ITYPE, VTYPE >::transpose | ( | bool | performSortAndUniqueCheck = true | ) | const |
| void mui::linalg::sparse_matrix< ITYPE, VTYPE >::write_vectors_to_file | ( | const std::string & | format_file_name, |
| const std::string & | val_file_name = {}, |
||
| const std::string & | row_file_name = {}, |
||
| const std::string & | col_file_name = {} |
||
| ) | const |