CMatrixWithEigenVectors Class

# CMatrixWithEigenVectors Class Reference

[CADIHash.h Index] [CADIHash.h Hierarchy]

A CMatrix with a CMatrix of eigenvectors in it More...

`#include <../libInvertedFile/include/CMatrixWithEigenVectors.h>`

Inherits: CMatrix

## Public Members

- CMatrixWithEigenVectors (int inSize)
- void calculateEigenVectors (int inSize)
- void calculateEigenVectors ()
- const CMatrix& getEigenVectors () const
- const vector<float>& getEigenValues () const
- friend ostream& operator<< (ostream& outStream, const CMatrixWithEigenVectors& inMatrix)

## Detailed Description

A CMatrix with a CMatrix of eigenvectors in it. The goal of this is to pick the "best" eigenvector with respect to our matrix of mutual trust.

Algorithm for calculating eigenvectors comes from numerical recipes.

define:_CMATRIXWITHEIGENVECTORS_TEST to get a test program with it (main)

## void calculateEigenVectors(int inSize)

Calculate the eigenvectors for this matrix and store them in mEigenValues; The corresponding Eigenvectors go to mEigenVectors.

Algorithm taken from numerical recipes kept semantics intact, but tried to do about everything differently. (pages 463-469 "Numerical recipes in C", 2nd edition)

Parameter is the size of the upper left submatrix for which the eigenvectors are calculated. mEigenvectors will have this size as well as mEigenValues

## void calculateEigenVectors()

calls calculateEigenVectors(mSize)

## const CMatrix& getEigenVectors() const

get a reference to the eigenvectors

## const vector<float>& getEigenValues() const

get a reference to the eigenvectors

## friend ostream& operator<<(ostream& outStream, const CMatrixWithEigenVectors& inMatrix)

generating diagnostic output:

| Kdoc