tridred

void tridred(double** a, int n, double* d, double* e);

Householder reduction of a real, symmetric matrix a. On output, a is replaced by the orthogonal matrix effecting the transformation. d returns the diagonal elements of the tridiagonal matrix, and e the off-diagonal elements, with e[0] = 0.

Parameters:
aMatrix to reduce
nSize of a
dDiagonal elements of reduced matrix
eOff-diagonal element of reduced matrix

Returns:
The vectors d and e with contain the diagonal and off-diagonal elements, respectfully, of the reduced matrix.

Usage:
double** a = dmatrix(0, 4, 0, 4);
double d[5];
double e[5];
// set the values of a
// a[i][j] = ...
tridred(a, 5, d, e);
free_dmatrix(a, 0, 4, 0);

Header:
#include "eigensys.h"