56 template class OPENMEEGMATHS_EXPORT std::map< std::pair< size_t, size_t >,
double >;
67 typedef std::map< std::pair< size_t, size_t >,
double >
Tank;
77 om_assert(i < nlin());
78 om_assert(j < ncol());
80 if (it != m_tank.end())
return it->second;
85 om_assert(i < nlin());
86 om_assert(j < ncol());
87 return m_tank[ std::make_pair( i, j ) ];
102 Vector getlin(
size_t i)
const;
103 void setlin(
Vector v,
size_t i);
105 void save(
const char *filename)
const;
106 void load(
const char *filename);
108 void save(
const std::string& s)
const {
save(s.c_str()); }
109 void load(
const std::string& s) {
load(s.c_str()); }
112 double frobenius_norm()
const;
128 for (
size_t j=0;j<
ncol();j++){
130 if (it !=
m_tank.end()) v(j)=it->second;
138 for (
size_t j=0;j<v.
nlin();j++){
void save(const std::string &s) const
SparseMatrix(const char *fname)
const_iterator end() const
void load(const std::string &s)
Vect3 operator*(const double &d, const Vect3 &v)
std::map< std::pair< size_t, size_t >, double > Tank
const Tank & tank() const
void setlin(Vector v, size_t i)
Vector getlin(size_t i) const
double & operator()(size_t i, size_t j)
double operator()(size_t i, size_t j) const
std::map< std::pair< size_t, size_t >, double >::const_iterator const_iterator
SparseMatrix(size_t N, size_t M)
std::map< std::pair< size_t, size_t >, double >::iterator iterator
const_iterator begin() const
virtual size_t ncol() const