#include <Mtx.h>
Inherits Base.
Inheritance diagram for Mtx:

Public Types | |
| COLUMN_DATA | |
| ROW_DATA = 0 | |
| TOTAL_DATA | |
| enum | VTYPE { ROW_DATA = 0, COLUMN_DATA, TOTAL_DATA, VTYPE_CNT } |
| VTYPE_CNT | |
Public Member Functions | |
| aType | absolute (void) const |
| aType | average (void) const |
| aType * | copyArray (aType *array) const |
| aType | determinant (void) const throw (MtxErr) |
| int | getCount (enum Mtx< aType >::VTYPE vType) const |
| aType | high (void) const |
| aType | low (void) const |
| Mtx (void) | |
| Mtx (const Mtx< aType > &mt) | |
| Mtx (aType var) | |
| Mtx (const aType *array, int nRows, int nCols) | |
| Mtx< aType > | operator * (aType scalar) const |
| Mtx< aType > | operator * (const Mtx< aType > &mt) const |
| const Mtx< aType > | operator *= (aType scalar) |
| operator const aType * (void) const | |
| operator const aType *const * (void) const | |
| Mtx< aType > | operator! (void) const throw (MtxErr) |
| bool | operator!= (const Mtx< aType > &mt) const |
| Mtx< aType > | operator+ (const Mtx< aType > &mt) const |
| Mtx< aType > | operator+ (void) const |
| Mtx< aType > | operator+= (const Mtx< aType > &mt) |
| Mtx< aType > | operator- (const Mtx< aType > &mt) const |
| Mtx< aType > | operator- (void) const |
| const Mtx< aType > | operator-= (const Mtx< aType > &mt) |
| Mtx< aType > | operator/ (aType scalar) const |
| const Mtx< aType > | operator/= (aType scalar) |
| const Mtx< aType > | operator= (aType x) |
| const Mtx< aType > | operator= (const Mtx< aType > &mt) |
| bool | operator== (const Mtx< aType > &mt) const |
| Mtx< aType > | operator~ (void) const |
| ~Mtx (void) | |
Static Public Attributes | |
| static const int | DEF_PRINT_WIDTH = 14 |
Friends | |
| template<typename bType> | |
| bType | fabs (const Mtx< bType > &mt) |
| template<typename bType> | |
| Mtx< bType > | operator * (bType scalar, const Mtx< bType > &mt) |
| template<typename bType> | |
| std::ostream & | operator<< (std::ostream &ostr, const Mtx< bType > &mt) |
This class template implements mathematical operations of two-dimensional matrices using <aType> variable declarations.
See the cited References to obtain more information on the mathematical theory applied here.
| enum VTYPE |
Enumeration indicates the error index of a thrown calc::MtxErr object.
| Mtx | ( | const aType * | array, | |
| int | nRows, | |||
| int | nCols | |||
| ) |
Constructor initializes a matrix object with matrix data.
| array | a pointer to a matrix valued array | |
| nRows | row count of the matrix array | |
| nCols | column count of the matrix array |
| Mtx | ( | aType | var | ) |
Constructor initializes a matrix object with a single value.
| var | value to store in 1 by 1 dimension matrix |
Copy constructor initializes a matrix object from the specified existing matrix object.
| mt | a reference to a matrix object |
| Mtx | ( | void | ) |
Constructor initializes a matrix object with no matrix data.
| ~Mtx | ( | void | ) |
Destructor frees allocated memory.
| aType absolute | ( | void | ) | const |
Function relates a finds the average of absolute values of the matrix.
| aType average | ( | void | ) | const |
Function returns the average value of all values stored in the matrix object.
| aType * copyArray | ( | aType * | array | ) | const |
Function copies the object's matrix array to the specified pointer.
| array | a pointer to a copy of the matrix array values |
| aType determinant | ( | void | ) | const throw (MtxErr) |
Function returns the determinant of a matrix object. The matrix object must contain a square matrix.
| MtxErr | type of object thrown
|
Function returns variable count information pertaining to matrix dimensions.
| vType | variable index indentifying the type of data |
| aType high | ( | void | ) | const |
Function returns the highest value stored in the matrix object.
| aType low | ( | void | ) | const |
Function returns the lowest value stored in the matrix object.
| Mtx<aType> operator * | ( | aType | scalar | ) | const |
Function overloads the multiplication operator *. The function multiplies the specified matrix object by the specified scalar.
| scalar | a value to multiply by |
Function overloads the multiplication operator *. The function finds the product of a matrix object times the specified matrix object.
| mt | a matrix object to be multiplied by |
| const Mtx<aType> operator *= | ( | aType | scalar | ) |
Function overloads the multiplication assignment operator *=. The function multiplies the matrix object by the specified scalar.
| scalar | a value to multiply by |
| operator const aType * | ( | void | ) | const |
Conversion function returns a pointer to the matrix array of values of the matrix object.
const aType *mt; | operator const aType *const * | ( | void | ) | const |
Conversion function returns a pointer to an array of row pointers that point to an array of column values in the matrix array of the matrix object.
const aType *const *mt; Function overloads the logical negation operator !. The function finds the inverse of a matrix object. The matrix object must contain a square matrix.
| MtxErr | type of object thrown
|
| bool operator!= | ( | const Mtx< aType > & | mt | ) | const |
Function overloads the inequality operator !=. The function compares the dimensions and values of two matrices.
| mt | a matrix object to be compared |
Function overloads the addition operator +. The function finds the sum of two matrices.
| mt | a matrix object to be added |
| Mtx<aType> operator+ | ( | void | ) | const |
Function overloads the addition operator +. The function returns a copy of the matrix.
Function overloads the addition assignment operator +=. The function finds the sum of two matrices and stores the results.
| mt | a matrix object to be added |
Function overloads the subtraction operator -. The function finds the difference between two matrices.
| mt | a matrix object to be subtracted |
| Mtx<aType> operator- | ( | void | ) | const |
Function overloads the subtraction operator -. The function finds the negative of a matrix.
Function overloads the subtraction assignment operator -=. The function finds the difference between two matrices and stores the results.
| mt | a matrix object to be subtracted |
| Mtx<aType> operator/ | ( | aType | scalar | ) | const |
Function overloads the division operator /. The function multiplies the specified matrix object by the specified scalar reciprocal.
| scalar | a value to reciprocate and multiply by |
| const Mtx<aType> operator/= | ( | aType | scalar | ) |
Function overloads the division assignment operator /=. The function multiplies the matrix object by the reciprocal of the specified scalar.
| scalar | a value to multiply by |
| const calc::Mtx< aType > operator= | ( | aType | x | ) |
Function overloads the assignment operator =. The function fills the existing matrix object with a single value x.
| x | a single value to be copied |
Function overloads the assignment operator =. The function copies the matrix object to an existing matrix.
| mt | a matrix object to be copied |
| bool operator== | ( | const Mtx< aType > & | mt | ) | const |
Function overloads the equality operator ==. The function compares the dimensions and values of two matrices.
| mt | a matrix object to be compared |
| calc::Mtx< aType > operator~ | ( | void | ) | const |
Function overloads the bitwise negation operator ~. The function finds the transpose of a matrix object.
| bType fabs | ( | const Mtx< bType > & | mt | ) | [friend] |
Function overloads the <cmath> library function std::fabs(). The function relates a matrix magnitude value with the sum of absolute values of the matrix.
| mt | a reference matrix object to find the magnitude of |
Function overloads the multiplication operator *. The function multiplies the specified scalar times the specified matrix object.
| scalar | a value to multiply by | |
| mt | a matrix object to be multiplied by |
| std::ostream& operator<< | ( | std::ostream & | ostr, | |
| const Mtx< bType > & | mt | |||
| ) | [friend] |
Function overloads the bitwise left shift operator <<. The function prints the specified matrix to the specified stream.
| ostr | a reference to a stream | |
| mt | a matrix object |
const int DEF_PRINT_WIDTH = 14 [static] |
code format text formatting real number field width
1.4.7