Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

DoubleMatrix Class Reference

Matrix from 1..rows, 1..cols of double values. More...

#include <linalg.h>

List of all members.

Public Member Functions

 DoubleMatrix (int r, int c)
 Constructor for matrix of zeroes 1..r,1..c.
 DoubleMatrix (const DoubleMatrix &m)
 Constructor sets = m.
 DoubleMatrix (const DoubleVector &v)
 Makes diagonal square matrix: diagonal elements are from v, in order.
 ~DoubleMatrix ()
 Standard destructor.
int displayRows () const
 Routines for outputting size of matrix.
const DoubleMatrixoperator= (const DoubleMatrix &v)
 Sets matrix equal to v.
const DoubleMatrixoperator= (const double &v)
 Sets diagonal entries equal to v, rest are 0.
DoubleMatrix operator+ (const DoubleMatrix &v) const
 Standard Linear algebra calculations.
DoubleVector operator * (const DoubleVector &v) const
 $ v_i = M_{ij} v_j $
double trace () const
 trace must only be performed on a square matrix
double & operator() (int i, int j)
 to reference one element
DoubleMatrix transpose () const
 can be any size
void swaprows (int i, int j)
 Obvious elementary row/column operations.
void associateOrderAbs (DoubleVector &v)
double display (int i, int j) const
 ijth element
double sumElements () const
 Returns sum of absolute values of all elements.
void symmetrise ()
 fills in bottom-left hand corner of a matrix
double compare (const DoubleMatrix &a) const
DoubleVector diagVals () const
 Just returns a vector filled with the diagonal values.
double diagonalise (DoubleMatrix &u, DoubleMatrix &v, DoubleVector &w) const
double diagonaliseSym (ComplexMatrix &v, DoubleVector &w) const
DoubleMatrix inverse () const
 returns inverse of a matrix
DoubleVector sym2by2 (double &theta) const
DoubleMatrix apply (double(*fn)(double))
 Applies fn to every element of a matrix.
DoubleVector asy2by2 (double &thetaL, double &thetaR) const
 2 by 2 asymmetric matrices
double min (int &k, int &l) const
 minimum element
double nmin (int &k, int &l) const
 next-to-minimum element
double max (int &k, int &l) const
void displayMat (double **temp) const
void associateOrderAbs (DoubleMatrix &u, DoubleMatrix &v, DoubleVector &w) const


Detailed Description

Matrix from 1..rows, 1..cols of double values.


Member Function Documentation

void DoubleMatrix::associateOrderAbs DoubleMatrix u,
DoubleMatrix v,
DoubleVector w
const
 

diag = U^T double M V. It will put the diag evals in abs ascending order and changes U,V accordingly

void DoubleMatrix::associateOrderAbs DoubleVector v  ) 
 

Perform on a mixing matrix O such that diag = O^double M O. It will put the diag evals in abs ascending order and change O accordingly

double DoubleMatrix::compare const DoubleMatrix a  )  const
 

Sums up the absolute value of the difference in each element of two matrices

double DoubleMatrix::diagonalise DoubleMatrix u,
DoubleMatrix v,
DoubleVector w
const
 

Uses singular SVD algorithm: $ A = U.W.V^T $ where W is a matrix of the eigenvalues, therefore $ W = U^T A V $.

double DoubleMatrix::diagonaliseSym ComplexMatrix v,
DoubleVector w
const
 

For SYMMETRIC MATRICES ONLY! $ A = V.W.V^T $ where W is a matrix of the eigenvalue therefore $ W = V^T A V $.

void DoubleMatrix::displayMat double **  temp  )  const
 

returns matrix contents in **temp. You have to free memory for temp before this

double DoubleMatrix::max int &  k,
int &  l
const
 

maximum element

DoubleVector DoubleMatrix::sym2by2 double &  theta  )  const
 

Special case that's often used: eigenvalues of 2 by 2 symmetric matrix A(2,1) is assumed to be equal to A(1,2). theta is the mixing angle: m1 is NOT NECESSARILY > m2


The documentation for this class was generated from the following files:
Generated on Fri Aug 26 16:37:13 2005 for SOFTSUSY by  doxygen 1.3.9.1