Robotran C Documentation
Macros | Functions
nrfct.h File Reference

Go to the source code of this file.

Macros

#define SIGN(a, b)   ((b) >= 0.0 ? fabs(a) : -fabs(a))
 
#define IMIN(a, b)
 
#define DMAX(a, b)
 
#define DSQR(a)   ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg)
 

Functions

int ludcmp (double **a, int n, int *indx, double *d)
 LU decomposition of a matrix with index starting at 1. More...
 
int ludcmp_0 (double **a, int n, int *indx, double *d)
 LU decomposition of a matrix with index starting at 0. More...
 
void lubksb (double **a, int n, int *indx, double b[])
 
void lubksb_0 (double **a, int n, int *indx, double b[])
 
int choldc (double **a, int n, double p[])
 Compute the Cholesky decomposition of a, i.e. More...
 
int choldc_0 (double **a, int n, double *p)
 
void cholsl (double **a, int n, double p[], double b[], double x[])
 
void cholsl_0 (double **a, int n, double *p, double *b, double *x)
 
void svdcmp (double **a, int m, int n, double w[], double **v)
 computes the Singular Value Decomposition a = u.w.v' More...
 
void svdcmp_0 (double **a, int m, int n, double w[], double **v)
 computes the Singular Value Decomposition a = u.w.v' More...
 
void svbksb (double **u, double w[], double **v, int m, int n, double b[], double x[])
 
void svbksb_0 (double **u, double w[], double **v, int m, int n, double b[], double x[])
 
void gaussj (double **a, int n, double **b, int m)
 

Detailed Description

This c header file declares various functions about linear algebra.

Creation date: 2006

Author
Robotran team

(c) Universite catholique de Louvain

Macro Definition Documentation

◆ DMAX

#define DMAX (   a,
 
)
Value:
(dmaxarg1=(a),dmaxarg2=(b),(dmaxarg1) > (dmaxarg2) ?\

◆ DSQR

#define DSQR (   a)    ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg)

◆ IMIN

#define IMIN (   a,
 
)
Value:
(iminarg1=(a),iminarg2=(b),(iminarg1) < (iminarg2) ?\

◆ SIGN

#define SIGN (   a,
 
)    ((b) >= 0.0 ? fabs(a) : -fabs(a))

Function Documentation

◆ choldc()

int choldc ( double **  a,
int  n,
double  p[] 
)

Compute the Cholesky decomposition of a, i.e.

the lower triangular matrix L such that a=L*L'

Elements off diagonal are stored directly in a. Diagonal elements are stored in p.

WARNING: a is modified !

◆ choldc_0()

int choldc_0 ( double **  a,
int  n,
double *  p 
)

◆ cholsl()

void cholsl ( double **  a,
int  n,
double  p[],
double  b[],
double  x[] 
)

◆ cholsl_0()

void cholsl_0 ( double **  a,
int  n,
double *  p,
double *  b,
double *  x 
)

◆ gaussj()

void gaussj ( double **  a,
int  n,
double **  b,
int  m 
)

◆ lubksb()

void lubksb ( double **  a,
int  n,
int *  indx,
double  b[] 
)

◆ lubksb_0()

void lubksb_0 ( double **  a,
int  n,
int *  indx,
double  b[] 
)

◆ ludcmp()

int ludcmp ( double **  a,
int  n,
int *  indx,
double *  d 
)

LU decomposition of a matrix with index starting at 1.

Parameters
[in,out]aInput and output matrix with index starting at 1.
[in]nsize of the square matrix a : [n x n] .
[out]indxRow permutations with index starting at 1.
[out]d+1 if the number of row interchange is even, -1 if it is odd.
Returns
Error status, <0 in case of failure (= 0 if no error).

◆ ludcmp_0()

int ludcmp_0 ( double **  a,
int  n,
int *  indx,
double *  d 
)

LU decomposition of a matrix with index starting at 0.

Parameters
[in,out]aInput and output matrix with index starting at 0.
[in]nsize of the square matrix a : [n x n].
[out]indxRow permutations with index starting at 0.
[out]d+1 if the number of row interchange is even, -1 if it is odd.
Returns
Error status, <0 in case of failure.

◆ svbksb()

void svbksb ( double **  u,
double  w[],
double **  v,
int  m,
int  n,
double  b[],
double  x[] 
)

◆ svbksb_0()

void svbksb_0 ( double **  u,
double  w[],
double **  v,
int  m,
int  n,
double  b[],
double  x[] 
)

◆ svdcmp()

void svdcmp ( double **  a,
int  m,
int  n,
double  w[],
double **  v 
)

computes the Singular Value Decomposition a = u.w.v'

The output matrix u is stored in the input matrix a.

The given arrays size is the minimum size, bigger arrays are acceptable. Indeed, the function will only use the first N elements of a 1D array or the first N rows and M columns of 2D arrays. Giving an oversized array as input (for example one of mbs_aux->... that is initialized at the system maximum possible size) is not an issue.

Parameters
[in,out]athe input matrix, with index starting at 1, to be decomposed. The content is modified to be the output matrix u. Its size must at least be m x n (0 element not taken into account).
[in]mthe number of rows (0 element not taken into account) of the matrix a.
[in]nthe number of columns (0 element not taken into account) of the matrix a.
[out]wthe vector, with index starting at 1, to store the singular values.
[out]vthe matrix v (not the transpose) of size n x n (0 element not taken into account).

◆ svdcmp_0()

void svdcmp_0 ( double **  a,
int  m,
int  n,
double  w[],
double **  v 
)

computes the Singular Value Decomposition a = u.w.v'

The output matrix u is stored in the input matrix a. The given arrays size are minimum size, bigger arrays are acceptable.

Parameters
[in,out]athe input matrix, with index starting at 0, to be decomposed. The content is modified to be the output matrix u. Its size must be m x n.
[in]mthe number of rows of the matrix a.
[in]nthe number of columns of the matrix a.
[out]wthe vector, with index starting at 0, to store the singular values.
[out]vthe matrix v (not the transpose) of size n x n.
dmaxarg1
static double dmaxarg1
Definition: bader.c:28
dmaxarg2
static double dmaxarg2
Definition: bader.c:28
iminarg2
static int iminarg2
Definition: svdcmp.c:22
iminarg1
static int iminarg1
Definition: svdcmp.c:22