24 #ifndef ACLMATRIXOFELEMENTS_H
25 #define ACLMATRIXOFELEMENTS_H
35 class MatrixOfElements
45 unsigned int ij2i(
unsigned int i,
unsigned int j)
const;
50 void setRow(
unsigned int r,
const VectorOfElements & a);
51 void setColumn(
unsigned int c,
const VectorOfElements & a);
53 const VectorOfElements
getVE(
unsigned int r,
unsigned int c)
const;
58 inline void resize(
unsigned int nr,
unsigned int nc);
66 void copy(
const MatrixOfElements & source, MatrixOfElements & destination);
72 MatrixOfElements
operator+(
const MatrixOfElements & a,
const MatrixOfElements & b);
77 MatrixOfElements
operator-(
const MatrixOfElements & a,
const MatrixOfElements & b);
83 MatrixOfElements
operator*(
const MatrixOfElements & a,
const MatrixOfElements & b);
89 VectorOfElements
operator*(
const VectorOfElements & a,
const MatrixOfElements & b);
95 VectorOfElements
operator*(
const MatrixOfElements & a,
const VectorOfElements & b);
101 MatrixOfElements
operator/(
const MatrixOfElements & a,
const VectorOfElements & b);
108 MatrixOfElements transpose(MatrixOfElements & source);
128 MatrixOfElements elementProduct(
const VectorOfElements & a,
const VectorOfElements & b);
131 VectorOfElements trace(
const MatrixOfElements & a);
134 VectorOfElements trace(
const MatrixOfElements & a,
const MatrixOfElements & b);
137 MatrixOfElements generateME(
const VectorOfElements & a);
140 MatrixOfElements generateME(
const VectorOfElements & a,VectorOfElements & b);
143 MatrixOfElements generateME(
const VectorOfElements & a,
144 const VectorOfElements & b,
145 const VectorOfElements & c);
148 MatrixOfElements generateME(
const VectorOfElements *a,
unsigned int n);
151 MatrixOfElements generateME(
const vector<VectorOfElements> &a);
158 VectorOfElements getDiagonal(
const MatrixOfElements & a);
165 VectorOfElements getOffDiagonalUp(
const MatrixOfElements & a);
171 VectorOfElements det(
const MatrixOfElements & m);
177 VectorOfElements
solveSystem(
const MatrixOfElements & a,
const VectorOfElements & b);
185 const VectorOfElements & b,
186 const VectorOfElements & x);
196 const VectorOfElements & b,
197 const VectorOfElements & x);
200 MatrixOfElements replaceRow(
const MatrixOfElements & a,
const VectorOfElements & b,
unsigned int r);
203 MatrixOfElements replaceColumn(
const MatrixOfElements & a,
const VectorOfElements & b,
unsigned int c);
206 MatrixOfElements generateMatrixCofactors(
const MatrixOfElements & a);
209 vector<Element> gcMatrixInversion(
const MatrixOfElements & a, MatrixOfElements & inv);
223 #endif // ACLMATRIXOFELEMENTS_H
vector< Element > gcSolveSystem(const MatrixOfElements &a, const VectorOfElements &b, const VectorOfElements &x)
generates code for solving the solution of a system of linear equations
MatrixOfElements operator=(const MatrixOfElements &m)
Advanced Computational Language.
Element operator+(Element e1, Element e2)
void setElement(unsigned int r, unsigned int c, Element a)
void setRow(unsigned int r, const VectorOfElements &a)
const unsigned int getNColumns() const
VectorOfElements & getInternalVector()
Element operator/(Element e1, Element e2)
VectorOfElements solveSystem(const MatrixOfElements &a, const VectorOfElements &b)
returns solution of a system of linear equations
Element operator-(Element e)
void resize(unsigned int nr, unsigned int nc)
const unsigned int getNRows() const
vector< Element > gcSolveSystemCG(const MatrixOfElements &a, const VectorOfElements &b, const VectorOfElements &x)
generates code for solving the solution of a system of linear equations
const Element getElement(unsigned int r, unsigned int c) const
void setColumn(unsigned int c, const VectorOfElements &a)
std::shared_ptr< ElementBase > Element
MatrixOfElements(unsigned int nR=0, unsigned int nC=0)
void copy(MemBlock &source, T *destination)
const VectorOfElements getVE(unsigned int r, unsigned int c) const
Element operator*(Element e1, Element e2)