1 #ifndef MATH_BLOCK_TRIDIAGONAL_MATRIX 2 #define MATH_BLOCK_TRIDIAGONAL_MATRIX 5 #include "BlockVector.h" 19 inline int numBlockRows()
const {
return (
int)diagonal.size(); }
20 inline int numBlockCols()
const {
return (
int)diagonal.size(); }
21 int numTotalRows()
const;
22 int numTotalCols()
const;
23 void resize(
int nBlock);
24 void resize(
int nBlock,
int nMat);
25 void resize(
int nBlock,
int nMat,Real initVal);
26 void resizeSimilar(
const MyT&);
29 Matrix& operator()(
int i,
int j);
30 const Matrix& operator()(
int i,
int j)
const;
32 inline void operator += (
const MyT& a) { inc(a); }
33 inline void operator -= (
const MyT& a) { dec(a); }
34 void add(
const MyT&,
const MyT&);
35 void sub(
const MyT&,
const MyT&);
36 void mul(
const MyT&,Real c);
37 void div(
const MyT&,Real c);
40 void madd(
const MyT&,Real c);
49 void setTranspose(
const MyT&);
53 void inplaceTranspose();
55 void getMatrix(
Matrix&)
const;
57 inline bool isEmpty()
const {
return diagonal.empty(); }
59 bool hasDims(
const MyT& m)
const;
60 bool hasDims(
int nBlock,
int nMat)
const;
62 std::vector<Matrix> diagonal,upperDiagonal,lowerDiagonal;
Definition: BlockTridiagonalMatrix.h:9
Definition: BlockVector.h:9
Contains all definitions in the Math package.
Definition: WorkspaceBound.h:12