TRIQS/triqs_modest 3.3.0
Brillouin zone summation
Loading...
Searching...
No Matches
nda Namespace Reference

Functions

void Ainv_B (nda::matrix< dcomplex, nda::F_layout > A, nda::matrix_view< dcomplex, nda::F_layout > B)
 
std::vector< std::vector< int > > find_blocks (nda::matrix_view< double > m, double threshold)
 Find a block structure of a Matrix.
 
template<typename T >
std::vector< T > flatten (const std::vector< std::vector< T > > &nested)
 
void format_as_table (std::ostream &out, nda::Matrix auto const &mat, auto const &row_labels, auto const &col_labels)
 Format the matrix mat as a table, with row/col_labels.
 
template<typename T >
bool is_diagonal (nda::matrix< T > const &M)
 
template<typename T >
nda::matrix< T > make_matrix_from_permutation (std::vector< int > const &p)
 

Function Documentation

◆ Ainv_B()

void nda::Ainv_B ( nda::matrix< dcomplex, nda::F_layout >  A,
nda::matrix_view< dcomplex, nda::F_layout >  B 
)
inline

Definition at line 12 of file nda_supp.hpp.

◆ find_blocks()

std::vector< std::vector< int > > nda::find_blocks ( nda::matrix_view< double >  m,
double  threshold 
)

Find a block structure of a Matrix.

Parameters
mA matrix (typically abs(some_matrix)).
thresholdAny value below this threshold is considered as 0
Returns
List of the groups of rows/cols which would make the matrix block diagonal

Definition at line 20 of file graph_algo.hpp.

◆ flatten()

template<typename T >
std::vector< T > nda::flatten ( const std::vector< std::vector< T > > &  nested)

Definition at line 26 of file nda_supp.hpp.

◆ format_as_table()

void nda::format_as_table ( std::ostream &  out,
nda::Matrix auto const &  mat,
auto const &  row_labels,
auto const &  col_labels 
)

Format the matrix mat as a table, with row/col_labels.

Parameters
outoutput stream
matThe matrix
row_labelsRange of string: name of the rows
col_labelsRange of string: name of the cols

Definition at line 113 of file nda_pretty_printer.hpp.

◆ is_diagonal()

template<typename T >
bool nda::is_diagonal ( nda::matrix< T > const &  M)

Definition at line 32 of file nda_supp.hpp.

◆ make_matrix_from_permutation()

template<typename T >
nda::matrix< T > nda::make_matrix_from_permutation ( std::vector< int > const &  p)

Definition at line 19 of file nda_supp.hpp.