9 #ifndef _fei_FillableMat_hpp_
10 #define _fei_FillableMat_hpp_
12 #include <fei_CSVec.hpp>
13 #include <fei_Pool_alloc.hpp>
14 #include <fei_EqnBuffer.hpp>
24 virtual ~FillableMat();
26 FillableMat& operator=(
const FillableMat& src);
28 void setValues(
double value);
30 void createPosition(
int row,
int col);
32 void sumInCoef(
int row,
int col,
double coef);
33 void putCoef(
int row,
int col,
double coef);
35 void sumInRow(
int row,
const int* cols,
const double* coefs,
unsigned len);
36 void putRow(
int row,
const int* cols,
const double* coefs,
unsigned len);
38 unsigned getNumRows()
const;
40 bool hasRow(
int row)
const;
42 const CSVec* getRow(
int row)
const;
43 CSVec* create_or_getRow(
int row);
45 typedef std::map<int, CSVec*, std::less<int>,
48 typedef feipoolmat::iterator iterator;
49 typedef feipoolmat::const_iterator const_iterator;
51 iterator begin() {
return matdata_.begin();}
52 iterator end() {
return matdata_.end();}
54 const_iterator begin()
const {
return matdata_.begin();}
55 const_iterator end()
const {
return matdata_.end();}
69 void print(std::ostream& os,
const FillableMat& mat);
void get_row_numbers(const FillableMat &mat, std::vector< int > &rows)
bool operator==(const SharedPtr< T > &a, const SharedPtr< U > &b)
bool operator!=(const SharedPtr< T > &a, const SharedPtr< U > &b)
int count_nnz(const FillableMat &mat)
void print(std::ostream &os, const FillableMat &mat)