13 #include "TMatrixDSym.h" 22 Projection(
int dimP,
int dimC) : m_matrixH(dimC, dimP), m_r(dimC), m_matrixV(dimC), m_offset(0), m_particle(nullptr), m_nHidden(0) {}
28 double &
H(
int row,
int col)
30 #ifdef VTK_BOUNDSCHECKING 31 assert(m_offset + row > 0 && col > 0 && m_offset + row <= m_matrixH.GetNrows() && col <= m_matrixH.GetNcols());
33 return m_matrixH(m_offset + row, col);
37 const TVectorD &
r()
const {
return m_r; }
38 TVectorD &
r() {
return m_r; }
42 #ifdef VTK_BOUNDSCHECKING 43 assert(m_offset + row > 0 && m_offset + row <= m_r.GetNrows());
45 return m_r(m_offset + row);
49 const TMatrixDSym &
V()
const {
return m_matrixV; }
51 double &
V(
int row,
int col) {
return m_matrixV(m_offset + row, m_offset + col); }
54 #ifdef VTK_BOUNDSCHECKING 55 assert(m_offset + row > 0 && m_offset + col > 0 && m_offset + row <= m_matrixV.GetNrows() && m_offset + col <= m_matrixV.GetNcols() && row >= col);
57 return m_matrixV(m_offset + row, m_offset + col);
80 TMatrixDSym W = m_matrixV;
83 return W.Similarity(m_r);
87 unsigned int offset()
const {
return m_offset; }
95 TMatrixDSym m_matrixV;
96 unsigned int m_offset;
99 unsigned int m_nHidden;
const TMatrixD & H() const
double & V(int row, int col)
void setParticle(const ParticleBase &p)
void incrementOffset(unsigned int i)
const TMatrixDSym & V() const
Projection(int dimP, int dimC)
unsigned int offset() const
const TVectorD & r() const
double & H(int row, int col)
const ParticleBase * particle() const
TMatrixT< double > TMatrixD
double & Vfast(int row, int col)