28#ifndef _MATRIX_INTERFACE_DOC_HPP_
29#define _MATRIX_INTERFACE_DOC_HPP_
38namespace matrix_interface {
59Matrix<C>::Matrix<C>();
66explicit Matrix<C>::Matrix<C>(
const comm_type& comm);
75Matrix<C>::Matrix<C>(
size_t n_row,
size_t n_col);
84Matrix<C>::Matrix<C>(
const comm_type& comm,
size_t n_row,
size_t n_col);
std::vector< C > flatten()
Return the flattened vector.
size_t local_size() const
Return the number of elements in this process.
C allreduce_sum(C value) const
Return the summation of a scalar. Every processes returns the same value.
void prep_global_to_local() const
Preprocess for fast conversion from local index to global one.
const C & operator[](size_t i) const
Const array subscript operator.
int comm_type
Set MPI_Comm for MPI programm.
Definition matrix_interface.hpp:41
void prep_local_to_global() const
Preprocess for fast conversion from local index to global one.
void bcast(D *buffer, int count, int root) const
Wrapper of MPI_Bcast.
int get_comm_size() const
Return the size of the MPI communicator.
const comm_type & get_comm() const
Return the MPI communicator.
int get_comm_rank() const
Return the MPI rank.
void barrier() const
Wrapper of MPI_Barrier.
mptensor::complex complex
Definition matrix_lapack.cc:36
double min(const Matrix< C > &a)
Return the minimum element.
int matrix_eigh(Matrix< C > &a, std::vector< double > &s, Matrix< C > &u)
double max_abs(const Matrix< C > &a)
Return the maximum of the absolute value of elements.
double max(const Matrix< C > &a)
Return the maximum element.
double min_abs(const Matrix< C > &a)
Return the minimum of the absolute value of elements.
int matrix_solve(Matrix< C > &a, Matrix< C > &b)
Solve linear equation .
Definition complex.hpp:34