25 #include <QtCore/QString>
52 std::cerr <<
"WARNING: SgVector operator*(const SgSymMatrix&, const SgVector&): "
53 <<
"incompatible ranges of matrix (" << P.
nCol() <<
") and vector ("
57 unsigned int N=std::min(P.
nRow(), V.
n()), i, l;
77 std::cerr <<
"WARNING: SgMatrix calcProduct_mat_x_mat(const SgMatrix& M1, "
78 <<
"const SgSymMatrix& P2): matrix size mismatch.\n";
81 unsigned int N=std::min(M1.
nCol(), P2.
nRow()), i, j, l;
82 unsigned int NRow=M1.
nRow(), NCol=P2.
nCol();
94 for (j=0; j<NCol; j++)
95 for (i=0; i<NRow; i++)
122 for (i=0; i<P.
nRow(); i++)
125 for (j=0; j<P.
nCol(); j++)
126 s <<
" " << qPrintable(str.sprintf(
"%12.5e", P.
getElement(i,j))) <<
" ";
132 for (j=0; j<P.
nCol(); j++)
134 s << i <<
" " << j <<
" " << P.
getElement(i,j) <<
"\n";
SgVector operator*(const SgSymMatrix &P, const SgVector &V)
std::ostream & operator<<(std::ostream &s, const SgSymMatrix &P)
SgMatrix calcProduct_mat_x_mat(const SgMatrix &M1, const SgSymMatrix &P2)
unsigned int nRow() const
void setElement(unsigned int i, unsigned int j, double d)
double getElement(unsigned int i, unsigned int j) const
unsigned int nCol() const
double getElement(unsigned int i, unsigned int j) const
void setElement(unsigned int i, double d)
double getElement(unsigned int i) const