85 row_cont_type::iterator ri;
86 row_cont_type::const_iterator re;
89 Ap[col] = x_ptr + offset;
92 Ax[x_ptr] = ri->second;
93 Ai[x_ptr] = ri->first + offset;
99 "SpMapMatrixHandler::MakeCompressedColumnForm");
101 Ap[
NCols] = x_ptr + offset;
108 std::vector<integer>& Ai, std::vector<integer>& Ap,
121 integer *
const Ap,
int offset)
const
125 row_cont_type::iterator ri;
126 row_cont_type::const_iterator re;
129 Ap[col] = x_ptr + offset;
132 Ax[x_ptr] = ri->second;
133 Arow[x_ptr] = ri->first + offset;
134 Acol[x_ptr] = col + offset;
140 "SpMapMatrixHandler::MakeIndexForm");
142 Ap[
NCols] = x_ptr + offset;
149 std::vector<integer>& Arow, std::vector<integer>& Acol,
150 std::vector<integer>& Ap,
int offset)
const
157 return MakeIndexForm(&Ax[0], &Arow[0], &Acol[0], &Ap[0], offset);
163 row_cont_type::const_iterator re;
164 row_cont_type::iterator ri;
200 row_cont_type::const_iterator ri, re;
203 out(ri->first + 1) = ri->second;
218 silent_cerr(
"Assertion fault "
219 "in SpMapMatrixHandler::MatMatIncMul" << std::endl);
225 row_cont_type::const_iterator ri, re;
228 for (
integer col_in = 1; col_in <= ncols_in; col_in++) {
229 (out.*op)(ri->first + 1, col_in,
230 ri->second*in(row_in + 1, col_in));
247 silent_cerr(
"Assertion fault "
248 "in SpMapMatrixHandler::MatTMatMul_base" << std::endl);
254 row_cont_type::const_iterator ri, re;
257 for (
integer col_in = 1; col_in <= ncols_in; col_in++) {
258 (out.*op)(row_out + 1, col_in,
259 ri->second*in(ri->first + 1, col_in));
275 silent_cerr(
"Assertion fault "
276 "in SpMapMatrixHandler::MulAndSumWithShift"
284 row_cont_type::const_iterator ri, re;
286 integer newcol = col + dcol + 1;
288 out.
IncCoef(ri->first + drow, newcol, ri->second*s);
303 silent_cerr(
"Assertion fault "
304 "in SpMapMatrixHandler::MulAndSumWithShift"
312 row_cont_type::const_iterator ri, re;
314 integer newcol = col + dcol + 1;
318 newcol, ri->second*s);
337 row_cont_type::const_iterator ri, re;
343 (out.*op)(ri->first + 1, d);
361 row_cont_type::const_iterator ri, re;
367 d += ri->second*in(ri->first + 1);
405 while (i == m.col_indices[elem.iCol].end()) {
406 if (++elem.iCol == m.NCols) {
411 i = m.col_indices[elem.iCol].begin();
414 elem.iRow = i->first;
415 elem.
dCoef = i->second;
435 return elem == op.
elem;
441 return elem != op.
elem;
std::vector< row_cont_type > col_indices
virtual integer iGetNumCols(void) const =0
#define ASSERTMSGBREAK(expr, msg)
const SparseMatrixHandler::SparseMatrixElement * operator->(void) const
virtual void IncCoef(integer iRow, integer iCol, const doublereal &dCoef)
#define MBDYN_EXCEPT_ARGS
const SpMapMatrixHandler::const_iterator & operator++(void) const
const SparseMatrixHandler::SparseMatrixElement & operator*(void) const
integer iGetNumRows(void) const
const_iterator(const SpMapMatrixHandler &m, bool is_end=false)
integer MakeCompressedColumnForm(doublereal *const Ax, integer *const Ai, integer *const Ap, int offset=0) const
SparseMatrixHandler::SparseMatrixElement elem
SpMapMatrixHandler(const SpMapMatrixHandler &)
virtual integer iGetSize(void) const =0
row_cont_type::const_iterator i
integer iGetNumCols(void) const
integer MakeIndexForm(doublereal *const Ax, integer *const Arow, integer *const Acol, integer *const AcolSt, int offset=0) const
MatrixHandler & MulAndSumWithShift(MatrixHandler &out, doublereal s=1., integer drow=0, integer dcol=0) const
void Resize(integer ir, integer ic)
SpMapMatrixHandler::const_iterator begin(void) const
MatrixHandler & FakeThirdOrderMulAndSumWithShift(MatrixHandler &out, std::vector< bool > b, doublereal s=1., integer drow=0, integer dcol=0) const
MatrixHandler & MatTMatMul_base(void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
const SpMapMatrixHandler & m
MatrixHandler & MatMatMul_base(void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
VectorHandler & GetCol(integer icol, VectorHandler &out) const
void reset(bool is_end=false)
virtual VectorHandler & MatVecMul_base(void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
virtual ~SpMapMatrixHandler(void)
virtual VectorHandler & MatTVecMul_base(void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
bool operator==(const SpMapMatrixHandler::const_iterator &op) const
bool operator!=(const SpMapMatrixHandler::const_iterator &op) const
virtual integer iGetNumRows(void) const =0