50 : iSize(n), bOwnsMemory(
true),
51 ppdRows(0), ppiRows(0), ppiCols(0), ppnonzero(0), piNzr(0), piNzc(0), m_end(*this,
true)
94 memset(
ppnonzero[0], 0,
sizeof(
char)*iSize*iSize);
157 for (
integer col = 0; col < ncols; col++) {
158 pnonzero[piCols[col]] = 0;
173 for (
integer ir = 1; ir <= nr; ir++) {
176 for (
integer ic = 1; ic <= nc; ic++) {
179 #ifdef CHECK_FOR_ZERO
200 for (
integer ir = 1; ir <= nr; ir++) {
203 for (
integer ic = 1; ic <= nc; ic++) {
206 #ifdef CHECK_FOR_ZERO
243 for (
integer iR = 1; iR <= nr; iR++) {
247 for (
integer ic = 0; ic < nc; ic++) {
250 #ifdef CHECK_FOR_ZERO
271 #ifdef CHECK_FOR_ZERO
305 for (
integer iR = 1; iR <= nr; iR++) {
308 for (
integer ic = 0; ic < nc; ic++) {
311 #ifdef CHECK_FOR_ZERO
332 #ifdef CHECK_FOR_ZERO
354 std::vector<integer>& Ap) {
360 Ap.resize(iSize + 1);
365 for (
integer row = 0; row < nzr; row++) {
388 for (
integer ik = 1; ik <= in_ncols; ik++) {
389 (out.*op)(ir + 1, ik,
ppdRows[ir][ic]*in(ic + 1, ik));
411 for (
integer ik = 1; ik <= in_ncols; ik++) {
412 (out.*op)(ic + 1, ik,
ppdRows[ir][ic]*in(ir + 1, ik));
432 (out.*op)(ir + 1,
ppdRows[ir][ic]*in(ic + 1));
450 (out.*op)(ic + 1,
ppdRows[ir][ic]*in(ir + 1));
495 while (i_row == m.piNzr[elem.iCol]) {
496 if (++elem.iCol == m.iSize) {
504 elem.iRow = m.ppiRows[elem.iCol][i_row];
505 elem.dCoef = m.ppdRows[elem.iRow][elem.iCol];
525 return elem == op.
elem;
531 return elem != op.
elem;
539 const std::vector<integer>& tperm,
540 const std::vector<integer>& tinvperm)
555 const std::vector<integer>& tperm,
556 const std::vector<integer>& tinvperm)
574 DEBUGCOUTFNAME(
"NaivePermMatrixHandler::~NaivePermMatrixHandler");
577 const std::vector<integer>&
590 const std::vector<integer>&
628 for (
integer ik = 1; ik <= in_ncols; ik++) {
660 for (
integer ik = 1; ik <= in_ncols; ik++) {
740 : m(m), i_row(0), elem(0, 0, 0.)
768 while (i_row == m.piNzr[m.perm[elem.iCol]]) {
769 if (++elem.iCol == m.iSize) {
777 elem.iRow = m.ppiRows[m.perm[elem.iCol]][i_row];
778 elem.dCoef = m.ppdRows[elem.iRow][m.perm[elem.iCol]];
798 return elem == op.
elem;
804 return elem != op.
elem;
virtual MatrixHandler & MatTMatMul_base(void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
virtual ~NaivePermMatrixHandler(void)
const NaiveMatrixHandler & m
integer iGetNumRows(void) const
virtual MatrixHandler & MatTMatMul_base(void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
virtual integer iGetColIndex(integer) const =0
const NaiveMatrixHandler::const_iterator & operator++(void) const
integer iGetNumCols(void) const
SparseMatrixHandler::SparseMatrixElement elem
virtual integer iGetNumCols(void) const =0
#define DEBUGCOUTFNAME(fname)
#define SAFEDELETEARR(pnt)
virtual ~NaiveMatrixHandler(void)
bool operator==(const NaivePermMatrixHandler::const_iterator &op) const
bool operator==(const NaiveMatrixHandler::const_iterator &op) const
enum VariableSubMatrixHandler::@13 eStatus
virtual integer iGetSize(void) const =0
const SparseMatrixHandler::SparseMatrixElement & operator*(void) const
const std::vector< integer > & perm
virtual VectorHandler & MatTVecMul_base(void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
virtual MatrixHandler & MatMatMul_base(void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
virtual integer iGetRowIndex(integer) const =0
const SparseMatrixHandler::SparseMatrixElement & operator*(void) const
const std::vector< integer > & GetPerm(void) const
bool operator!=(const NaivePermMatrixHandler::const_iterator &op) const
NaiveMatrixHandler(const NaiveMatrixHandler &)
SparseMatrixHandler::SparseMatrixElement elem
void reset(bool is_end=false)
#define ASSERT(expression)
const SparseMatrixHandler::SparseMatrixElement * operator->(void) const
virtual const doublereal & operator()(integer iRow, integer iCol) const
virtual VectorHandler & MatVecMul_base(void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
NaivePermMatrixHandler(integer iSize, const std::vector< integer > &tperm, const std::vector< integer > &invperm)
const NaivePermMatrixHandler::const_iterator & operator++(void) const
const_iterator(const NaivePermMatrixHandler &m)
virtual MatrixHandler & MatMatMul_base(void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
virtual MatrixHandler & operator-=(const SubMatrixHandler &SubMH)
virtual VectorHandler & MatVecMul_base(void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
#define SAFENEWARR(pnt, item, sz)
virtual MatrixHandler & operator+=(const SubMatrixHandler &SubMH)
const std::vector< integer > & invperm
const SparseMatrixHandler::SparseMatrixElement * operator->(void) const
void MakeCCStructure(std::vector< integer > &Ai, std::vector< integer > &Ap)
virtual VectorHandler & MatTVecMul_base(void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
void reset(bool is_end=false)
const_iterator(const NaiveMatrixHandler &m, bool is_end=false)
const NaivePermMatrixHandler & m
bool operator!=(const NaiveMatrixHandler::const_iterator &op) const
const std::vector< integer > & GetInvPerm(void) const
virtual integer iGetNumRows(void) const =0