MuGen
Multitrait genetics
Modules | Functions
Auxiliary functions
Collaboration diagram for Auxiliary functions:

Modules

 Centering functions
 

Functions

double mhl (const gsl_vector *beta, const gsl_matrix *SigI)
 Mahalanobis distance. More...
 
void printMat (const gsl_matrix *m)
 Print matrix to screen. More...
 
unsigned long long rdtsc ()
 Accessing the processor RTDSC instruction. More...
 

Detailed Description

Various functions that are needed internally.

Function Documentation

◆ mhl()

double mhl ( const gsl_vector *  beta,
const gsl_matrix *  SigI 
)

Mahalanobis distance.

Calculates the Mahalanobis distance of a vector from zero.

Parameters
[in]gsl_vector*the vector
[in]gsl_matrix*the corresponding inverse-covariance matrix
Returns
a scalar value of type double.

◆ printMat()

void printMat ( const gsl_matrix *  m)

Print matrix to screen.

Printing a GSL matrix to screen, with each row on a line, values seprated by spaces.

Parameters
[in]gsl_matrix*matrix to be displayed
[in]double&label for missing data

◆ rdtsc()

unsigned long long rdtsc ( )

Accessing the processor RTDSC instruction.

Returns
a value of type unsigned long long.

This function outputs the processor RTDSC instruction for use in seeding random number generators using assembly code.

Warning
this function is unlikely to work under Windows.