The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
regression.h File Reference
#include "deprecated.h"

Go to the source code of this file.

Macros

#define _REGRESSION_H_DEPRECATED
 

Functions

BOOL blCalculateBestFitLine (double **coordinates, int numberOfPoints, int numberOfDimensions, double *centroid, double *eigenVector)
 
void blFindCentroid (REAL **coordinates, int numberOfPoints, int numberOfDimensions, REAL *centroid)
 
BOOL blCalculateCovarianceMatrix (REAL **x, int numX, int numY, REAL **cov)
 

Macro Definition Documentation

#define _REGRESSION_H_DEPRECATED

Definition at line 16 of file regression.h.

Function Documentation

BOOL blCalculateBestFitLine ( REAL **  coordinates,
int  numberOfPoints,
int  numberOfDimensions,
REAL centroid,
REAL eigenVector 
)
Parameters
[in]coordinates2D Array containing the coordinates
[in]numberOfPointsThe number of points in the array
[in]numberOfDimensionsThe number of dimensions (usually 3)
[out]centroidThe centroid of the points
[out]eigenVectorThe best Eigen vector
Returns
Success?

Calculates a best fit line through a set of coordinates in 3D. The results are returned in 'eigenVector'

The code calculates the centroid and ouputs this. The covariance matrix is then calculated and the Eigen vectors and values of the covariance matrix are then calculated. The Eigenvalue with the largest Eigenvector represents the best fit line passing through the centroid.

  • 07.10.14 Original By: ACRM Based on code by Abhi Raghavan

Definition at line 116 of file regression.c.

BOOL blCalculateCovarianceMatrix ( REAL **  matrix,
int  numX,
int  numY,
REAL **  cov 
)
Parameters
[in]matrixThe matrix
[in]numXx-dimension of the matrix
[in]numYy-dimension of the matrix
[out]covThe covariance matrix
Returns
Success

Find the covariance matrix for a given matrix

  • 07.10.14 Original By: ACRM (based on code by Abhi Raghavan)

Definition at line 254 of file regression.c.

void blFindCentroid ( REAL **  matrix,
int  numX,
int  numY,
REAL centroid 
)
Parameters
[in]matrixCoordinate array
[in]numXThe x-dimension of the array
[in]numYThe y-dimension of the array
[out]centroidThe centroid of the points

Calculates the centroid of an array of points

  • 07.10.14 Original By: ACRM

Definition at line 215 of file regression.c.