#include <linalg.h>
Public Member Functions | |
ComplexMatrix (int r, int c) | |
Default constructor: full of zeroes. | |
ComplexMatrix (const ComplexMatrix &m) | |
Constructor sets matrix equal to m. | |
ComplexMatrix (const DoubleVector &v) | |
Constructor sets square matrix's diagonal values equal to elements of v. | |
ComplexMatrix (const ComplexVector &v) | |
Makes diagonal square matrix out of v. | |
ComplexMatrix | operator+ (Complex f) |
Adds f times identity. Must be used on a square matrix. | |
ComplexMatrix | operator- (Complex f) |
Subtracts f times identity. Must be used on a square matrix. | |
ComplexVector | operator * (const ComplexVector &) |
![]() | |
Complex & | operator() (int i, int j) |
Returns ijth element. | |
void | swaprows (int i, int j) |
Swaps row i with row j. | |
void | swapcols (int i, int j) |
Swaps column i with column j. | |
Complex | display (int i, int j) const |
returns ijth element | |
void | symmetrise () |
Fills in lower bottom half of a square matrix copying the top right. | |
double | compare (const ComplexMatrix &a) const |
Returns the sum of the modulus of the difference of each element. | |
Complex | min (int &k, int &l) const |
void | displayMat (Complex **temp) const |
|
whole matrix displayed in **temp. You have to free memory for temp before this |
|
minimum element modulus value |