Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

Matrix Class Reference

#include <matrix.h>

List of all members.


Detailed Description

Matrix manipulation class tailored for circuit equations.

This class performs matrix storage, lu decomposition, forward and backward substitution, and a few other useful operations. Steps in using class: (1) Create an instance of this class with the correct size (2) Define the matrix pattern as neccessary: (1) Call zero (unnecessary after initial ceration) to reset the pattern & matrix (2) Call setUse to set the use of each element in the matrix (3) Call createMap to generate the row-wise permutation mapping for use in partial pivoting (3) Add the values to the matrix (4) Call performLU, and get the results with fbSub (5) Repeat 2, 3, 4 or 5 as necessary.

Todo:
We need to allow createMap to work while the matrix has already been initalised
Author:
David Saxton

Definition at line 78 of file matrix.h.


Public Member Functions

const double b (uint i, uint j) const
double & b (uint i, uint j)
const double c (uint i, uint j) const
double & c (uint i, uint j)
void createMap ()
const double d (uint i, uint j) const
double & d (uint i, uint j)
void displayLU ()
void displayMatrix ()
void fbSub (Vector *x)
const double g (uint i, uint j) const
double & g (uint i, uint j)
bool isChanged () const
const double m (uint i, uint j) const
 Matrix (uint n, uint m)
void multiply (Vector *rhs, Vector *result)
void operator+= (Matrix *const m)
void operator= (Matrix *const m)
void performLU ()
void setUse (const uint i, const uint j, Map::e_type type, bool big)
void setUse_b (const uint i, const uint j, Map::e_type type, bool big)
void setUse_c (const uint i, const uint j, Map::e_type type, bool big)
void setUse_d (const uint i, const uint j, Map::e_type type, bool big)
void zero ()

Private Member Functions

void swapRows (const uint a, const uint b)

Private Attributes

int * m_inMap
matrixm_lu
uint m_m
Mapm_map
matrixm_mat
uint m_n
uint m_size
double * m_y
uint max_k

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index