1 #ifndef _PVFMM_MATRIX_HPP_ 2 #define _PVFMM_MATRIX_HPP_ 7 #include <pvfmm/vector.hpp> 8 #include <pvfmm/common.hpp> 12 template <
class ValueType>
class Vector;
15 template <
class ValueType>
class Matrix {
20 Matrix(Long dim1, Long dim2, Iterator<ValueType> data_ = NULL,
bool own_data_ =
true);
28 void ReInit(Long dim1, Long dim2, Iterator<ValueType> data_ = NULL,
bool own_data_ =
true);
30 void Write(
const char* fname)
const;
32 void Read(
const char* fname);
34 Long Dim(Long i)
const;
38 Iterator<ValueType> Begin();
40 ConstIterator<ValueType> Begin()
const;
52 ValueType& operator()(Long i, Long j);
54 const ValueType& operator()(Long i, Long j)
const;
56 Iterator<ValueType> operator[](Long i);
58 ConstIterator<ValueType> operator[](Long i)
const;
85 StaticArray<Long, 2> dim;
86 Iterator<ValueType> data_ptr;
90 template <
class ValueType> std::ostream& operator<<(std::ostream& output, const Matrix<ValueType>& M);
123 template <
class ValueType> std::ostream& operator<<(std::ostream& output, const Permutation<ValueType>& P);
127 #include <pvfmm/matrix.txx> 129 #endif //_PVFMM_MATRIX_HPP_ Definition: matrix.hpp:13
Definition: cheb_utils.hpp:12
Definition: matrix.hpp:15
Definition: matrix.hpp:12