Matrix(3)

NAME
Matrix

SYNOPSIS

#include <Matrix.h>

  Classes
class Row

  Public Member Functions
Matrix ()
Matrix (const Matrix &mat)
Matrix (long rows, long cols)
Matrix (Bstring &filename)
~Matrix ()
void write (Bstring &filename)
double * data ()
Row operator[] (long i)
Matrix operator= (const Matrix mat)
Matrix operator- ()
Matrix operator * (Matrix &mat)
long rows ()
long columns ()
long size ()
void show_below_cutoff (double d)
void swap_rows_columns (long rc1, long rc2)
Matrix delete_row_column (long rc)
void fill (double v)
int check_for_singularity ()
void normalize ()
void randomize ()
int multiply_in_place (vector< double > &vec)
double determinant ()
double LU_decomposition ()
Matrix inversion by LU decomposition.
double LU_decomposition (vector< double > &b)
double singular_value_decomposition ()
Singular value decomposition of a matrix .
double singular_value_decomposition (vector< double > &b)
int jrotate (double s, double tau, long i, long j, long k, long l)
vector< double > jacobi_rotation ()
Computes all eigenvalues and eigenvectors of a real symmetric matrix.
void eigen_sort (vector< double > &val)
Computes all eigenvalues and eigenvectors of a real symmetric matrix.

Detailed Description

Definition at line 21 of file Matrix.h.

Constructor & Destructor Documentation

  Matrix::Matrix () [inline]

Definition at line 40 of file Matrix.h.

  Matrix::Matrix (const Matrix & mat) [inline]

Definition at line 41 of file Matrix.h.

  Matrix::Matrix (long rows, long cols) [inline]

Definition at line 45 of file Matrix.h.

  Matrix::Matrix (Bstring & filename) [inline]

Definition at line 48 of file Matrix.h.

  Matrix::~Matrix () [inline]

Definition at line 93 of file Matrix.h.

Member Function Documentation

  int Matrix::check_for_singularity () [inline]

Definition at line 188 of file Matrix.h.

  long Matrix::columns () [inline]

Definition at line 154 of file Matrix.h.

  double* Matrix::data () [inline]

Definition at line 111 of file Matrix.h.

  Matrix Matrix::delete_row_column (long rc) [inline]

Definition at line 173 of file Matrix.h.

  double Matrix::determinant () [inline]

Definition at line 247 of file Matrix.h.

  void Matrix::eigen_sort (vector< double > & val)

Computes all eigenvalues and eigenvectors of a real symmetric matrix.

Returns:
    double* val eigenvalues.

The eigenvectors are returned in the columns of the input matrix. Reference: Press W.H. et al (1992) Numerical Recipes in C.Sorts eigenvalues into descending order and rearranges matrix columns accordingly.

Parameters:
    val eigenvalues.

Returns:
    void .

    The eigenvectors are in the columns.
    This method uses straight insertion.

     Reference: Press W.H. et al (1992) Numerical Recipes in C.

Definition at line 677 of file matrix.cpp.

  void Matrix::fill (double v) [inline]

Definition at line 186 of file Matrix.h.

  vector< double > Matrix::jacobi_rotation ()

Computes all eigenvalues and eigenvectors of a real symmetric matrix.

Returns:
    double* val eigenvalues.

The eigenvectors are returned in the columns of the input matrix. Reference: Press W.H. et al (1992) Numerical Recipes in C.

Definition at line 421 of file matrix.cpp.

  int Matrix::jrotate (double s, double tau, long i, long j, long k, long l)

Definition at line 394 of file matrix.cpp.

  double Matrix::LU_decomposition ()

Matrix inversion by LU decomposition.

Returns:
    double determinant.

    This inverts matrix A by LU decomposition.
    The matrix A must be square and is converted to and replaced by its inverse.
    Note: The matrix is modified.

     Reference: Press W.H. et al (1992) Numerical Recipes in C.

Definition at line 78 of file matrix.cpp.

  double Matrix::LU_decomposition (vector< double > & b) [inline]

Definition at line 254 of file Matrix.h.

  int Matrix::multiply_in_place (vector< double > & vec)

Definition at line 49 of file matrix.cpp.

  void Matrix::normalize () [inline]
The rows and columns are alternatively iteratively normalized until the error is small enough.

Definition at line 202 of file Matrix.h.

  Matrix Matrix::operator * (Matrix & mat) [inline]

Definition at line 143 of file Matrix.h.

  Matrix Matrix::operator- () [inline]

Definition at line 138 of file Matrix.h.

  Matrix Matrix::operator= (const Matrix mat) [inline]

Definition at line 131 of file Matrix.h.

  Row Matrix::operator[] (long i) [inline]

Definition at line 126 of file Matrix.h.

  void Matrix::randomize () [inline]

Definition at line 237 of file Matrix.h.

  long Matrix::rows () [inline]

Definition at line 153 of file Matrix.h.

  void Matrix::show_below_cutoff (double d) [inline]

Definition at line 157 of file Matrix.h.

  double Matrix::singular_value_decomposition ()

Singular value decomposition of a matrix .

Returns:
    double* 0.

The matrix A is replaced by the matrix U. Reference: Press W.H. et al (1992) Numerical Recipes in C.

Definition at line 177 of file matrix.cpp.

  double Matrix::singular_value_decomposition (vector< double > & b) [inline]

Definition at line 265 of file Matrix.h.

  long Matrix::size () [inline]

Definition at line 155 of file Matrix.h.

  void Matrix::swap_rows_columns (long rc1, long rc2) [inline]

Definition at line 167 of file Matrix.h.

  void Matrix::write (Bstring & filename) [inline]

Definition at line 95 of file Matrix.h.

Author

Generated automatically by Doxygen for Bsoft from the source code.