55 template class OPENMEEGMATHS_EXPORT std::map< std::pair< size_t, size_t >,
double >;
66 typedef std::map< std::pair< size_t, size_t >,
double >
Tank;
76 om_assert(i < nlin());
77 om_assert(j < ncol());
79 if (it != m_tank.end())
return it->second;
84 om_assert(i < nlin());
85 om_assert(j < ncol());
86 return m_tank[ std::make_pair( i, j ) ];
101 Vector getlin(
size_t i)
const;
102 void setlin(
Vector v,
size_t i);
104 void save(
const char *filename)
const;
105 void load(
const char *filename);
107 void save(
const std::string& s)
const {
save(s.c_str()); }
108 void load(
const std::string& s) {
load(s.c_str()); }
111 double frobenius_norm()
const;
127 for (
size_t j=0;j<
ncol();j++){
129 if (it !=
m_tank.end()) v(j)=it->second;
137 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