19 template class OPENMEEGMATHS_EXPORT std::map<std::pair<size_t,size_t>,
double>;
29 typedef std::map<std::pair<size_t,size_t>,
double>
Tank;
42 return (
it!=m_tank.end()) ?
it->second : 0.0;
48 return m_tank[std::make_pair(
i,
j)];
70 for (
size_t j=0;
j<ncol(); ++
j) {
72 v(
j) = (
it!=m_tank.end()) ?
it->second : 0.0;
79 for (
size_t j=0;
j<
v.nlin(); ++
j)
86 ofs << maths::format(
filename,maths::format::FromSuffix) << *
this;
87 }
catch (maths::Exception&) {
95 ifs >> maths::format(
filename,maths::format::FromSuffix) >> *
this;
96 }
catch (maths::Exception&) {
Matrix class Matrix class.
SparseMatrix(const char *fname)
SparseMatrix transpose() const
double operator()(const size_t i, const size_t j) const
const Tank & tank() const
Vector operator*(const Vector &x) const
SparseMatrix(const size_t N, const size_t M)
void save(const char *filename) const
const_iterator end() const
void save(const std::string &s) const
const_iterator begin() const
SparseMatrix operator+(const SparseMatrix &m) const
SparseMatrix operator*(const SparseMatrix &m) const
void load(const std::string &s)
void load(const char *filename)
std::map< std::pair< size_t, size_t >, double > Tank
Vector getlin(const size_t i) const
Tank::const_iterator const_iterator
void setlin(const Vector &v, const size_t i)
double frobenius_norm() const
double & operator()(size_t i, size_t j)
Matrix operator*(const Matrix &m) const
Matrix operator*(const SymMatrix &m) const