Bioplib
Protein Structure C Library
|
#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) |
#define _REGRESSION_H_DEPRECATED |
Definition at line 16 of file regression.h.
BOOL blCalculateBestFitLine | ( | REAL ** | coordinates, |
int | numberOfPoints, | ||
int | numberOfDimensions, | ||
REAL * | centroid, | ||
REAL * | eigenVector | ||
) |
[in] | coordinates | 2D Array containing the coordinates |
[in] | numberOfPoints | The number of points in the array |
[in] | numberOfDimensions | The number of dimensions (usually 3) |
[out] | centroid | The centroid of the points |
[out] | eigenVector | The best Eigen vector |
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.
Definition at line 116 of file regression.c.
[in] | matrix | The matrix |
[in] | numX | x-dimension of the matrix |
[in] | numY | y-dimension of the matrix |
[out] | cov | The covariance matrix |
Find the covariance matrix for a given matrix
Definition at line 254 of file regression.c.
[in] | matrix | Coordinate array |
[in] | numX | The x-dimension of the array |
[in] | numY | The y-dimension of the array |
[out] | centroid | The centroid of the points |
Calculates the centroid of an array of points
Definition at line 215 of file regression.c.