|
JX Application Framework
|
#include <JMatrix.h>
Public Member Functions | |
| JMatrix (const JSize rowCount, const JSize colCount, const JFloat fillValue=0.0) | |
| JMatrix (const JVector &) | |
| JMatrix (const JMatrix &) | |
| ~JMatrix () | |
| JMatrix & | operator= (const JMatrix &) |
| JMatrix & | operator+= (const JMatrix &) |
| JMatrix & | operator-= (const JMatrix &) |
| JMatrix & | operator*= (const JFloat) |
| JMatrix & | operator/= (const JFloat) |
| JMatrix | operator- () const |
| JSize | GetRowCount () const |
| JSize | GetColCount () const |
| JSize | GetElementCount () const |
| JFloat | GetElement (const JIndex rowIndex, const JIndex colIndex) const |
| void | SetElement (const JIndex rowIndex, const JIndex colIndex, const JFloat value) |
| void | IncrementElement (const JIndex rowIndex, const JIndex colIndex, const JFloat delta) |
| void | SetAllElements (const JFloat value) |
| void | SetRow (const JIndex rowIndex, const JFloat v1,...) |
| void | SetCol (const JIndex colIndex, const JFloat v1,...) |
| void | SetElements (const JFloat v1,...) |
| JVector | GetRowVector (const JIndex rowIndex) const |
| void | SetRowVector (const JIndex rowIndex, const JVector &rowVector) |
| JVector | GetColVector (const JIndex colIndex) const |
| void | SetColVector (const JIndex colIndex, const JVector &colVector) |
| JMatrix | Transpose () const |
| bool | Invert (JMatrix *inverse) const |
| JFloat | Determinant () const |
| void | Print (std::ostream &output) const |
| bool | RowIndexValid (const JIndex rowIndex) const |
| bool | ColIndexValid (const JIndex colIndex) const |
Protected Member Functions | |
| void | SwapRows (const JIndex index1, const JIndex index2) |
| void | ScaleRow (const JIndex rowIndex, const JFloat scaleFactor) |
| void | AddRowToRow (const JIndex sourceIndex, const JFloat scaleFactor, const JIndex destIndex) |
| JIndex | FindPivotRow (const JIndex rowIndex) const |
Friends | |
| bool | JGaussianElimination (const JMatrix &A, const JVector &b, JVector *x) |
| bool | JGaussianElimination (const JMatrix &A, const JMatrix &b, JMatrix *x) |
| bool | JGaussianElimination (JMatrix *A, JMatrix *x) |
This class was not designed to be a base class! If you need to override it, be sure to make the destructor virtual.
| JMatrix::JMatrix | ( | const JVector & | v | ) |
| JMatrix::JMatrix | ( | const JMatrix & | source | ) |
| JMatrix::~JMatrix | ( | ) |
|
protected |
| JFloat JMatrix::Determinant | ( | ) | const |
Given the diagonal element that is under consideration, search all the elements in this column below the diagonal to find the largest one.
|
inline |
Return the specified column as a JVector.
|
inline |
|
inline |
Adds the given value to the specified element.
Returns true if we were able to calculate an inverse.
| JMatrix JMatrix::operator- | ( | ) | const |
| void JMatrix::Print | ( | std::ostream & | output | ) | const |
| void JMatrix::SetAllElements | ( | const JFloat | value | ) |
Replace the specified column with the given values.
Replace the specified column with the given JVector.
| void JMatrix::SetElements | ( | const JFloat | v1, |
| ... | |||
| ) |
Fills the matrix with the given values in row major order.
Replace the specified row with the given values.
Replace the specified row with the given JVector.
| JMatrix JMatrix::Transpose | ( | ) | const |
Returns true if we were able to perform Gaussian elimination on A|b to reduce A to the identity. The result of b is stored in x.
A does not have to be square. A, b, x must all have the same number of rows. b and x must have the same number of columns.
Returns true if we were able to perform Gaussian elimination on A|x. A and x are both modified. If the process fails, the partial results are returned.
A does not have to be square. A and x must all have the same number of rows.