![]() |
amino
Lightweight Robot Utility Library
|
Go to the source code of this file.
Functions | |
AA_API void | aa_la_d_transpose (size_t m, size_t n, const double *A, size_t lda, double *B, size_t ldb) |
type for operations More... | |
AA_API double | aa_la_d_ssd (size_t n, const double *x, size_t incx, const double *y, size_t incy) |
Sum-square differences of x and y. More... | |
AA_API void | aa_la_d_lerp (size_t n, double u, const double *v1, size_t inc1, const double *v2, size_t inc2, double *vu, size_t incu) |
Linear interpolation of vectors. More... | |
AA_API void | aa_la_d_3spline_param (size_t n, double tf, const double *x1, size_t incx1, const double *dx1, size_t incdx1, const double *x2, size_t inc2, const double *dx2, size_t incdx2, double *a2, double *a3) |
Compute cubic spline parameters. | |
AA_API void | aa_la_d_3spline (size_t n, double tf, const double *x1, size_t incx1, const double *dx1, size_t incdx1, const double *a2, const double *a3, double *x, size_t incx, double *dx, size_t incdx, double *ddx, size_t incddx) |
Compute cubic spline value. | |
AA_API void | aa_la_d_5spline_param (size_t n, double tf, const double *x1, size_t incx1, const double *dx1, size_t incdx1, const double *ddx1, size_t incddx1, const double *x2, size_t inc2, const double *dx2, size_t incdx2, const double *ddx2, size_t incddx2, double *a3, double *a4, double *a5) |
Compute quintic spline parameters. | |
AA_API void | aa_la_d_5spline (size_t n, double tf, const double *x1, size_t incx1, const double *dx1, size_t incdx1, const double *ddx1, size_t incddx1, const double *a3, const double *a4, const double *a5, double *x, size_t incx, double *dx, size_t incdx, double *ddx, size_t incddx) |
Compute quintic spline value. | |
AA_API double | aa_la_d_vecstd (size_t n, const double *x, size_t incx, double mu) |
Standard deviation of vector. More... | |
AA_API void | aa_la_d_colmean (size_t m, size_t n, const double *A, size_t lda, double *x) |
Mean of columns of A. More... | |
AA_API void | aa_la_d_rowmean (size_t m, size_t n, const double *A, size_t lda, double *x) |
Mean of rows of A. More... | |
AA_API void | aa_la_d_colcov (size_t m, size_t n, const double *A, size_t lda, const double *x, double *E, size_t lde) |
Covariance of columns of A. More... | |
AA_API void | aa_la_d_assign_hungarian (size_t m, size_t n, const double *A, size_t lda, ssize_t *row_assign, ssize_t *col_assign) |
Hungarian algorithm to solve min assignment problem. More... | |
AA_API void | aa_la_d_assign_hungarian_max2min (size_t m, size_t n, double *A, size_t lda) |
Converts max assignment to min assignment for Hungarian algorithm. More... | |
static size_t | aa_la_d_minloc (size_t n, double *x, size_t incx) |
Minimum location of vector x. | |
static double | aa_la_d_mat_max (size_t m, size_t n, double *A, size_t lda, size_t *pi, size_t *pj) |
Minimum location of vector x. | |
static size_t | aa_la_d_maxloc (size_t n, double *x, size_t incx) |
Maximum location of vector x. | |
AA_API double | aa_la_d_angle (size_t n, const double *x, size_t incx, const double *y, size_t incy) |
Angle between vectors. More... | |
AA_API int | aa_la_d_lls (size_t m, size_t n, size_t p, const double *A, size_t lda, const double *b, size_t ldb, double *x, size_t ldx) |
Linear Least Squares. More... | |
AA_API int | aa_la_d_svd (size_t m, size_t n, const double *A, size_t lda, double *U, size_t ldu, double *S, double *Vt, size_t ldvt) |
Singular Value Decomposition of A. More... | |
AA_API double | aa_la_d_median (size_t n, const double *x, size_t incx) |
Cmpute median. More... | |
AA_API double | aa_la_d_nmedian (size_t n, double *x) |
Destructive median computation. More... | |
static double | aa_la_d_nmedian_pop (size_t n, double *x) |
Compute median and pop array from local memory region. | |
double | aa_la_d_mad (size_t n, const double u, const double *x, size_t incx) |
Median Absolute Deviation. More... | |
double | aa_la_d_mad2 (size_t m, size_t n, const double *u, const double *A, size_t lda) |
Median Absolute Deviation with Euclidean distance. More... | |
AA_API int | aa_la_d_eev (size_t n, const double *A, size_t lda, double *wr, double *wi, double *Vl, size_t ldvl, double *Vr, size_t ldvr) |
Compute eigen values and vectors. | |
AA_API void | aa_la_d_colfit (size_t m, size_t n, const double *A, size_t lda, double *x) |
Fit a least-squares hyperplane to columns of A. More... | |
int | aa_la_d_compar (const void *a, const void *b) |
int | aa_la_d_ls_duqu_cmat (const double *sigma, const double *theta, double *cm) |
Create a companion matrix for the lambda polynomial in se3 least-squares. More... | |
AA_API void | aa_la_s_transpose (size_t m, size_t n, const float *A, size_t lda, float *B, size_t ldb) |
type for operations More... | |
AA_API float | aa_la_s_ssd (size_t n, const float *x, size_t incx, const float *y, size_t incy) |
Sum-square differences of x and y. More... | |
AA_API void | aa_la_s_lerp (size_t n, float u, const float *v1, size_t inc1, const float *v2, size_t inc2, float *vu, size_t incu) |
Linear interpolation of vectors. More... | |
AA_API void | aa_la_s_3spline_param (size_t n, float tf, const float *x1, size_t incx1, const float *dx1, size_t incdx1, const float *x2, size_t inc2, const float *dx2, size_t incdx2, float *a2, float *a3) |
Compute cubic spline parameters. | |
AA_API void | aa_la_s_3spline (size_t n, float tf, const float *x1, size_t incx1, const float *dx1, size_t incdx1, const float *a2, const float *a3, float *x, size_t incx, float *dx, size_t incdx, float *ddx, size_t incddx) |
Compute cubic spline value. | |
AA_API void | aa_la_s_5spline_param (size_t n, float tf, const float *x1, size_t incx1, const float *dx1, size_t incdx1, const float *ddx1, size_t incddx1, const float *x2, size_t inc2, const float *dx2, size_t incdx2, const float *ddx2, size_t incddx2, float *a3, float *a4, float *a5) |
Compute quintic spline parameters. | |
AA_API void | aa_la_s_5spline (size_t n, float tf, const float *x1, size_t incx1, const float *dx1, size_t incdx1, const float *ddx1, size_t incddx1, const float *a3, const float *a4, const float *a5, float *x, size_t incx, float *dx, size_t incdx, float *ddx, size_t incddx) |
Compute quintic spline value. | |
AA_API float | aa_la_s_vecstd (size_t n, const float *x, size_t incx, float mu) |
Standard deviation of vector. More... | |
AA_API void | aa_la_s_colmean (size_t m, size_t n, const float *A, size_t lda, float *x) |
Mean of columns of A. More... | |
AA_API void | aa_la_s_rowmean (size_t m, size_t n, const float *A, size_t lda, float *x) |
Mean of rows of A. More... | |
AA_API void | aa_la_s_colcov (size_t m, size_t n, const float *A, size_t lda, const float *x, float *E, size_t lde) |
Covariance of columns of A. More... | |
AA_API void | aa_la_s_assign_hungarian (size_t m, size_t n, const float *A, size_t lda, ssize_t *row_assign, ssize_t *col_assign) |
Hungarian algorithm to solve min assignment problem. More... | |
AA_API void | aa_la_s_assign_hungarian_max2min (size_t m, size_t n, float *A, size_t lda) |
Converts max assignment to min assignment for Hungarian algorithm. More... | |
static size_t | aa_la_s_minloc (size_t n, float *x, size_t incx) |
Minimum location of vector x. | |
static float | aa_la_s_mat_max (size_t m, size_t n, float *A, size_t lda, size_t *pi, size_t *pj) |
Minimum location of vector x. | |
static size_t | aa_la_s_maxloc (size_t n, float *x, size_t incx) |
Maximum location of vector x. | |
AA_API float | aa_la_s_angle (size_t n, const float *x, size_t incx, const float *y, size_t incy) |
Angle between vectors. More... | |
AA_API int | aa_la_s_lls (size_t m, size_t n, size_t p, const float *A, size_t lda, const float *b, size_t ldb, float *x, size_t ldx) |
Linear Least Squares. More... | |
AA_API int | aa_la_s_svd (size_t m, size_t n, const float *A, size_t lda, float *U, size_t ldu, float *S, float *Vt, size_t ldvt) |
Singular Value Decomposition of A. More... | |
AA_API float | aa_la_s_median (size_t n, const float *x, size_t incx) |
Cmpute median. More... | |
AA_API float | aa_la_s_nmedian (size_t n, float *x) |
Destructive median computation. More... | |
static float | aa_la_s_nmedian_pop (size_t n, float *x) |
Compute median and pop array from local memory region. | |
float | aa_la_s_mad (size_t n, const float u, const float *x, size_t incx) |
Median Absolute Deviation. More... | |
float | aa_la_s_mad2 (size_t m, size_t n, const float *u, const float *A, size_t lda) |
Median Absolute Deviation with Euclidean distance. More... | |
AA_API int | aa_la_s_eev (size_t n, const float *A, size_t lda, float *wr, float *wi, float *Vl, size_t ldvl, float *Vr, size_t ldvr) |
Compute eigen values and vectors. | |
AA_API void | aa_la_s_colfit (size_t m, size_t n, const float *A, size_t lda, float *x) |
Fit a least-squares hyperplane to columns of A. More... | |
int | aa_la_s_compar (const void *a, const void *b) |
int | aa_la_s_ls_duqu_cmat (const double *sigma, const double *theta, double *cm) |
Create a companion matrix for the lambda polynomial in se3 least-squares. More... | |
AA_API double aa_la_d_angle | ( | size_t | n, |
const double * | x, | ||
size_t | incx, | ||
const double * | y, | ||
size_t | incy | ||
) |
Angle between vectors.
n | length of vectors |
x | first vector |
incx | stepsize of x |
y | second vector |
incy | stepsize of y |
AA_API void aa_la_d_assign_hungarian | ( | size_t | m, |
size_t | n, | ||
const double * | A, | ||
size_t | lda, | ||
ssize_t * | row_assign, | ||
ssize_t * | col_assign | ||
) |
Hungarian algorithm to solve min assignment problem.
m | rows of A | |
n | cols of A | |
[in] | A | cost matrix, column major, destroyed on exit |
lda | leading dimension of A | |
[out] | row_assign | array of column assigned to row at index i, length m. Unmatched elements have the value of -1. |
[out] | col_assign | mapping from col to matched row |
AA_API void aa_la_d_assign_hungarian_max2min | ( | size_t | m, |
size_t | n, | ||
double * | A, | ||
size_t | lda | ||
) |
Converts max assignment to min assignment for Hungarian algorithm.
m | rows of A |
n | cols of A |
A | cost matrix for max problem, converted to matrix for min proble on exit |
lda | leading dimension of A |
AA_API void aa_la_d_colcov | ( | size_t | m, |
size_t | n, | ||
const double * | A, | ||
size_t | lda, | ||
const double * | x, | ||
double * | E, | ||
size_t | lde | ||
) |
Covariance of columns of A.
m | rows of A | |
n | cols of A | |
lda | leading dimension of A | |
[in] | A | source matrix, m*n |
[in] | x | mean of columns of A, length m |
[out] | E | covariance of columns of A, m*m |
lde | leading dimension of E |
AA_API void aa_la_d_colfit | ( | size_t | m, |
size_t | n, | ||
const double * | A, | ||
size_t | lda, | ||
double * | x | ||
) |
Fit a least-squares hyperplane to columns of A.
Normalizes data first.
m | rows of A, size of space |
n | cols of A, number of points |
A | data points |
lda | leading dimension of A |
x | output hyperplance in hessian normal form |
AA_API void aa_la_d_colmean | ( | size_t | m, |
size_t | n, | ||
const double * | A, | ||
size_t | lda, | ||
double * | x | ||
) |
Mean of columns of A.
m | rows of A | |
n | cols of A | |
lda | leading dimension of A | |
[in] | A | source matrix, m*n |
[out] | x | destination vector for mean, length m |
AA_API void aa_la_d_lerp | ( | size_t | n, |
double | u, | ||
const double * | v1, | ||
size_t | inc1, | ||
const double * | v2, | ||
size_t | inc2, | ||
double * | vu, | ||
size_t | incu | ||
) |
Linear interpolation of vectors.
n | length of vectors |
u | interpolation parameter, at 0, vu=v1, and at 1, vu=v2 |
v1 | initial vector |
v2 | final vector |
inc1 | stepsize of v1 |
inc2 | stepsize of v2 |
incu | stepsize of vu |
AA_API int aa_la_d_lls | ( | size_t | m, |
size_t | n, | ||
size_t | p, | ||
const double * | A, | ||
size_t | lda, | ||
const double * | b, | ||
size_t | ldb, | ||
double * | x, | ||
size_t | ldx | ||
) |
Linear Least Squares.
\[ b = Ax \]
Solves for x.
m | rows in A |
n | cols in A |
p | cols in b and x |
A | matrix |
lda | leading dimension of A |
b | offset matrix |
ldb | leading dimension of b |
x | solution matrix |
ldx | leading dimension of x |
int aa_la_d_ls_duqu_cmat | ( | const double * | sigma, |
const double * | theta, | ||
double * | cm | ||
) |
Create a companion matrix for the lambda polynomial in se3 least-squares.
sigma | Singular values of A, in vector form. |
theta | Values of U^T b. |
cm | The output companion matrix. |
double aa_la_d_mad | ( | size_t | n, |
const double | u, | ||
const double * | x, | ||
size_t | incx | ||
) |
Median Absolute Deviation.
n | number of elements |
u | median |
x | data array |
incx | increment of x |
double aa_la_d_mad2 | ( | size_t | m, |
size_t | n, | ||
const double * | u, | ||
const double * | A, | ||
size_t | lda | ||
) |
Median Absolute Deviation with Euclidean distance.
m | rows of A, length of u |
n | cols of A |
u | median (increment of 1) |
A | data matrix |
lda | leading dimension of A |
AA_API double aa_la_d_median | ( | size_t | n, |
const double * | x, | ||
size_t | incx | ||
) |
Cmpute median.
n | number of elements in x |
x | data array |
incx | increment amount for x |
AA_API double aa_la_d_nmedian | ( | size_t | n, |
double * | x | ||
) |
Destructive median computation.
n | number of elements in x |
x | data array |
incx | increment amount for x |
AA_API void aa_la_d_rowmean | ( | size_t | m, |
size_t | n, | ||
const double * | A, | ||
size_t | lda, | ||
double * | x | ||
) |
Mean of rows of A.
m | rows of A | |
n | cols of A | |
lda | leading dimension of A | |
[in] | A | source matrix, m*n |
[out] | x | destination vector for mean, length n |
AA_API double aa_la_d_ssd | ( | size_t | n, |
const double * | x, | ||
size_t | incx, | ||
const double * | y, | ||
size_t | incy | ||
) |
Sum-square differences of x and y.
n | length of vectors |
x | first vector |
y | second vector |
incx | stepsize of x |
incy | stepsize of y |
AA_API int aa_la_d_svd | ( | size_t | m, |
size_t | n, | ||
const double * | A, | ||
size_t | lda, | ||
double * | U, | ||
size_t | ldu, | ||
double * | S, | ||
double * | Vt, | ||
size_t | ldvt | ||
) |
Singular Value Decomposition of A.
\[ A = U \Sigma V^T \]
m | rows |
n | columns |
A | \(A \in \Re^m \times \Re^n\), column major |
lda | leading dimension of A |
U | \(U \in \Re^m \times \Re^m\), column major. If null or ldu==0, U is returned in A. U and Vt cannot both be null. |
ldu | leading dimension of U |
S | \(S \in \Re^m min(m,n)\), singular values |
Vt | \(V^T \in \Re^n \times \Re^n\), singular vectors. If null or ldvt==0, Vt is returned in A. Vt and U cannot both be null. |
ldvt | leading dimension of Vt |
AA_API void aa_la_d_transpose | ( | size_t | m, |
size_t | n, | ||
const double * | A, | ||
size_t | lda, | ||
double * | B, | ||
size_t | ldb | ||
) |
type for operations
name mangling Transpose A into B.
m | rows of A, cols of B | |
n | cols of A, rows of B | |
[in] | A | source matrix, m*n |
[in] | B | destination matrix, n*m |
lda | leading dimension of A | |
ldb | leading dimension of B |
AA_API double aa_la_d_vecstd | ( | size_t | n, |
const double * | x, | ||
size_t | incx, | ||
double | mu | ||
) |
Standard deviation of vector.
n | length of d |
x | vector |
incx | increment of x |
mu | mean |
AA_API float aa_la_s_angle | ( | size_t | n, |
const float * | x, | ||
size_t | incx, | ||
const float * | y, | ||
size_t | incy | ||
) |
Angle between vectors.
n | length of vectors |
x | first vector |
incx | stepsize of x |
y | second vector |
incy | stepsize of y |
AA_API void aa_la_s_assign_hungarian | ( | size_t | m, |
size_t | n, | ||
const float * | A, | ||
size_t | lda, | ||
ssize_t * | row_assign, | ||
ssize_t * | col_assign | ||
) |
Hungarian algorithm to solve min assignment problem.
m | rows of A | |
n | cols of A | |
[in] | A | cost matrix, column major, destroyed on exit |
lda | leading dimension of A | |
[out] | row_assign | array of column assigned to row at index i, length m. Unmatched elements have the value of -1. |
[out] | col_assign | mapping from col to matched row |
AA_API void aa_la_s_assign_hungarian_max2min | ( | size_t | m, |
size_t | n, | ||
float * | A, | ||
size_t | lda | ||
) |
Converts max assignment to min assignment for Hungarian algorithm.
m | rows of A |
n | cols of A |
A | cost matrix for max problem, converted to matrix for min proble on exit |
lda | leading dimension of A |
AA_API void aa_la_s_colcov | ( | size_t | m, |
size_t | n, | ||
const float * | A, | ||
size_t | lda, | ||
const float * | x, | ||
float * | E, | ||
size_t | lde | ||
) |
Covariance of columns of A.
m | rows of A | |
n | cols of A | |
lda | leading dimension of A | |
[in] | A | source matrix, m*n |
[in] | x | mean of columns of A, length m |
[out] | E | covariance of columns of A, m*m |
lde | leading dimension of E |
AA_API void aa_la_s_colfit | ( | size_t | m, |
size_t | n, | ||
const float * | A, | ||
size_t | lda, | ||
float * | x | ||
) |
Fit a least-squares hyperplane to columns of A.
Normalizes data first.
m | rows of A, size of space |
n | cols of A, number of points |
A | data points |
lda | leading dimension of A |
x | output hyperplance in hessian normal form |
AA_API void aa_la_s_colmean | ( | size_t | m, |
size_t | n, | ||
const float * | A, | ||
size_t | lda, | ||
float * | x | ||
) |
Mean of columns of A.
m | rows of A | |
n | cols of A | |
lda | leading dimension of A | |
[in] | A | source matrix, m*n |
[out] | x | destination vector for mean, length m |
AA_API void aa_la_s_lerp | ( | size_t | n, |
float | u, | ||
const float * | v1, | ||
size_t | inc1, | ||
const float * | v2, | ||
size_t | inc2, | ||
float * | vu, | ||
size_t | incu | ||
) |
Linear interpolation of vectors.
n | length of vectors |
u | interpolation parameter, at 0, vu=v1, and at 1, vu=v2 |
v1 | initial vector |
v2 | final vector |
inc1 | stepsize of v1 |
inc2 | stepsize of v2 |
incu | stepsize of vu |
AA_API int aa_la_s_lls | ( | size_t | m, |
size_t | n, | ||
size_t | p, | ||
const float * | A, | ||
size_t | lda, | ||
const float * | b, | ||
size_t | ldb, | ||
float * | x, | ||
size_t | ldx | ||
) |
Linear Least Squares.
\[ b = Ax \]
Solves for x.
m | rows in A |
n | cols in A |
p | cols in b and x |
A | matrix |
lda | leading dimension of A |
b | offset matrix |
ldb | leading dimension of b |
x | solution matrix |
ldx | leading dimension of x |
int aa_la_s_ls_duqu_cmat | ( | const double * | sigma, |
const double * | theta, | ||
double * | cm | ||
) |
Create a companion matrix for the lambda polynomial in se3 least-squares.
sigma | Singular values of A, in vector form. |
theta | Values of U^T b. |
cm | The output companion matrix. |
float aa_la_s_mad | ( | size_t | n, |
const float | u, | ||
const float * | x, | ||
size_t | incx | ||
) |
Median Absolute Deviation.
n | number of elements |
u | median |
x | data array |
incx | increment of x |
float aa_la_s_mad2 | ( | size_t | m, |
size_t | n, | ||
const float * | u, | ||
const float * | A, | ||
size_t | lda | ||
) |
Median Absolute Deviation with Euclidean distance.
m | rows of A, length of u |
n | cols of A |
u | median (increment of 1) |
A | data matrix |
lda | leading dimension of A |
AA_API float aa_la_s_median | ( | size_t | n, |
const float * | x, | ||
size_t | incx | ||
) |
Cmpute median.
n | number of elements in x |
x | data array |
incx | increment amount for x |
AA_API float aa_la_s_nmedian | ( | size_t | n, |
float * | x | ||
) |
Destructive median computation.
n | number of elements in x |
x | data array |
incx | increment amount for x |
AA_API void aa_la_s_rowmean | ( | size_t | m, |
size_t | n, | ||
const float * | A, | ||
size_t | lda, | ||
float * | x | ||
) |
Mean of rows of A.
m | rows of A | |
n | cols of A | |
lda | leading dimension of A | |
[in] | A | source matrix, m*n |
[out] | x | destination vector for mean, length n |
AA_API float aa_la_s_ssd | ( | size_t | n, |
const float * | x, | ||
size_t | incx, | ||
const float * | y, | ||
size_t | incy | ||
) |
Sum-square differences of x and y.
n | length of vectors |
x | first vector |
y | second vector |
incx | stepsize of x |
incy | stepsize of y |
AA_API int aa_la_s_svd | ( | size_t | m, |
size_t | n, | ||
const float * | A, | ||
size_t | lda, | ||
float * | U, | ||
size_t | ldu, | ||
float * | S, | ||
float * | Vt, | ||
size_t | ldvt | ||
) |
Singular Value Decomposition of A.
\[ A = U \Sigma V^T \]
m | rows |
n | columns |
A | \(A \in \Re^m \times \Re^n\), column major |
lda | leading dimension of A |
U | \(U \in \Re^m \times \Re^m\), column major. If null or ldu==0, U is returned in A. U and Vt cannot both be null. |
ldu | leading dimension of U |
S | \(S \in \Re^m min(m,n)\), singular values |
Vt | \(V^T \in \Re^n \times \Re^n\), singular vectors. If null or ldvt==0, Vt is returned in A. Vt and U cannot both be null. |
ldvt | leading dimension of Vt |
AA_API void aa_la_s_transpose | ( | size_t | m, |
size_t | n, | ||
const float * | A, | ||
size_t | lda, | ||
float * | B, | ||
size_t | ldb | ||
) |
type for operations
name mangling Transpose A into B.
m | rows of A, cols of B | |
n | cols of A, rows of B | |
[in] | A | source matrix, m*n |
[in] | B | destination matrix, n*m |
lda | leading dimension of A | |
ldb | leading dimension of B |
AA_API float aa_la_s_vecstd | ( | size_t | n, |
const float * | x, | ||
size_t | incx, | ||
float | mu | ||
) |
Standard deviation of vector.
n | length of d |
x | vector |
incx | increment of x |
mu | mean |