| Bsoft 2.0.5 Bernard's software package

Classes | Functions | Variables
Matrix.h File Reference

Generalized matrix class. More...

`#include "random_numbers.h"`
`#include <iostream>`
`#include <fstream>`

Go to the source code of this file.

## Classes
class | Matrix
class | Matrix::Row

## Functions
ostream & | operator<< (ostream &output, Matrix &mat)
Vector3< double > | principal_axes (Vector3< double > avg, Vector3< double > avg2, Vector3< double > avgx, Vector3< double > *eigenvec)
| Calculates the principal axes of 3D coordinates. More...
vector< double > | dsyevq3 (Matrix &A)
| Calculates the eigenvalues and normalized eigenvectors of a symmetric 3x3 matrix. More...
void | dsytrd3 (Matrix &A, double d[3], double e[2])

## Variables
int | verbose

## Detailed Description

Generalized matrix class.

Author
  Bernard Heymann

Date
  Created: 20000501
  Modified: 20180723

Definition in file Matrix.h.

## Function Documentation

## ◆ dsyevq3()

vector<double> dsyevq3 | ( | Matrix & | A | ) |

Calculates the eigenvalues and normalized eigenvectors of a symmetric 3x3 matrix.

Parameters

  A | matrix, replaced by normalized eigenvectors.

Returns
  double* eigenvalues.

      Calculates the eigenvalues and normalized eigenvectors of a symmetric 3x3
      matrix A using the QL algorithm with implicit shifts, preceded by a
      Householder reduction to tridiagonal form.
      The function accesses only the diagonal and upper triangular parts of A.

Reference: Kopp (2008).

Definition at line 850 of file matrix.cpp.

## ◆ dsytrd3()

void dsytrd3 | ( | Matrix & | A,
|  | double | d[3],
|  | double | e[2]
| ) |  |

## ◆ operator<<()

ostream& operator<< | ( | ostream & | output,
|  | Matrix & | mat
| ) |  |

Definition at line 18 of file matrix.cpp.

## ◆ principal_axes()

Vector3<double> principal_axes | ( | Vector3< double > | avg,
|  | Vector3< double > | avg2,
|  | Vector3< double > | avgx,
|  | Vector3< double > * | eigenvec
| ) |  |

Calculates the principal axes of 3D coordinates.

Parameters

  avg | average of vectors.
  avg2 | average of squared vectors.
  avgx | average of cross products {xy, xz, yz}.
  *eigenvec | 3 return eigen vectors (can be NULL).

Returns
  Vector3<double> principal axes.

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

Definition at line 706 of file matrix.cpp.

## Variable Documentation

## ◆ verbose

int verbose