Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
eigen.c File Reference

Calculates Eigen values and Eigen vectors for a symmetric matrix. More...

#include <stdlib.h>
#include <math.h>
#include "MathType.h"
#include "array.h"
#include "eigen.h"

Go to the source code of this file.

Macros

#define MAXITERATION   50 /* Maximum number of iterations */
 
#define TESTSMALL(x, y)   ((fabs(y)+(x)) == fabs(y))
 

Functions

int blEigen (REAL **matrix, REAL **eigenVectors, REAL *eigenValues, int matrixSize)
 

Detailed Description

Calculates Eigen values and Eigen vectors for a symmetric matrix.

Version
V1.0
Date
03.10.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

Usage:

Revision History:

Definition in file eigen.c.

Macro Definition Documentation

#define MAXITERATION   50 /* Maximum number of iterations */

Definition at line 74 of file eigen.c.

#define TESTSMALL (   x,
 
)    ((fabs(y)+(x)) == fabs(y))

Definition at line 79 of file eigen.c.

Function Documentation

int blEigen ( REAL **  matrix,
REAL **  eigenVectors,
REAL eigenValues,
int  matrixSize 
)
Parameters
[in]**matrixSymmetric matrix
[in]matrixSizeDimension of the matrix
[out]**eigenVectorsThe eigen vectors
[out]*eigenValuesThe eigen values
Returns
If >0, the number of Jacobi rotations performed If <0, error: EIGEN_NOMEMORY - memory allocation EIGEN_NOCONVERGE - didn't converge in 50 iterations

Calculates the eigenvalues and eigenvectors of a REAL symmetric matrix Note that this routine destroys the values above the diagonal of the matrix.

  • 02.10.14 Original By: ACRM

Definition at line 115 of file eigen.c.