|
Matrix $Rev: 2718 $ at $LastChangedDate: 2011-10-06 11:45:17 +0200 (Thu, 06 Oct 2011) $
|
#include "dgeMatrix.h"
Go to the source code of this file.
Defines | |
| #define | geMatrix_getDiag_1 |
| #define | geMatrix_getDiag_2 |
| #define | RE_PERMUTE(I) |
| #define | SWAP_COL(I, J) F77_CALL(dswap)(&n, &v[(I)*n], &i1, &v[(J)*n], &i1) |
| #define | SWAP_ROW(I, J) F77_CALL(dswap)(&n, &v[(I)], &n, &v[(J)], &n) |
Functions | |
| SEXP | dgeMatrix_colsums (SEXP x, SEXP naRmP, SEXP cols, SEXP mean) |
| SEXP | dgeMatrix_crossprod (SEXP x, SEXP trans) |
| SEXP | dgeMatrix_determinant (SEXP x, SEXP logarithm) |
| SEXP | dgeMatrix_dgeMatrix_crossprod (SEXP x, SEXP y, SEXP trans) |
| SEXP | dgeMatrix_exp (SEXP x) |
| Matrix exponential - based on the _corrected_ code for Octave's expm function. | |
| SEXP | dgeMatrix_getDiag (SEXP x) |
| SEXP | dgeMatrix_LU (SEXP x, SEXP warn_singularity) |
| SEXP | dgeMatrix_LU_ (SEXP x, Rboolean warn_sing) |
| SEXP | dgeMatrix_matrix_crossprod (SEXP x, SEXP y, SEXP trans) |
| SEXP | dgeMatrix_matrix_mm (SEXP a, SEXP bP, SEXP right) |
| SEXP | dgeMatrix_matrix_solve (SEXP a, SEXP b) |
| SEXP | dgeMatrix_norm (SEXP obj, SEXP type) |
| SEXP | dgeMatrix_rcond (SEXP obj, SEXP type) |
| SEXP | dgeMatrix_Schur (SEXP x, SEXP vectors) |
| SEXP | dgeMatrix_solve (SEXP a) |
| SEXP | dgeMatrix_svd (SEXP x, SEXP nnu, SEXP nnv) |
| SEXP | dgeMatrix_validate (SEXP obj) |
| SEXP | dMatrix_validate (SEXP obj) |
| static double | get_norm (SEXP obj, const char *typstr) |
| SEXP | lgeMatrix_getDiag (SEXP x) |
Variables | |
| static const double | padec [] |
| #define geMatrix_getDiag_1 |
int *dims = INTEGER(GET_SLOT(x, Matrix_DimSym)); \ int i, m = dims[0], nret = (m < dims[1]) ? m : dims[1]; \ SEXP x_x = GET_SLOT(x, Matrix_xSym)
Referenced by dgeMatrix_getDiag(), and lgeMatrix_getDiag().
| #define geMatrix_getDiag_2 |
for (i = 0; i < nret; i++) { \ rv[i] = xv[i * (m + 1)]; \ } \ UNPROTECT(1); \ return ret
Referenced by dgeMatrix_getDiag(), and lgeMatrix_getDiag().
| #define RE_PERMUTE | ( | I | ) |
Referenced by dgeMatrix_exp().
| #define SWAP_COL | ( | I, | |
| J | |||
| ) | F77_CALL(dswap)(&n, &v[(I)*n], &i1, &v[(J)*n], &i1) |
| #define SWAP_ROW | ( | I, | |
| J | |||
| ) | F77_CALL(dswap)(&n, &v[(I)], &n, &v[(J)], &n) |
| SEXP dgeMatrix_colsums | ( | SEXP | x, |
| SEXP | naRmP, | ||
| SEXP | cols, | ||
| SEXP | mean | ||
| ) |
Definition at line 608 of file dgeMatrix.c.
References Alloca, Matrix_DimSym, and Matrix_xSym.
| SEXP dgeMatrix_crossprod | ( | SEXP | x, |
| SEXP | trans | ||
| ) |
Definition at line 86 of file dgeMatrix.c.
References ALLOC_SLOT(), AZERO, Matrix_DimNamesSym, Matrix_DimSym, Matrix_factorSym, Matrix_uploSym, and Matrix_xSym.

| SEXP dgeMatrix_determinant | ( | SEXP | x, |
| SEXP | logarithm | ||
| ) |
Definition at line 247 of file dgeMatrix.c.
References _, as_det_obj(), dgeMatrix_LU_(), Matrix_DimSym, Matrix_permSym, and Matrix_xSym.

| SEXP dgeMatrix_dgeMatrix_crossprod | ( | SEXP | x, |
| SEXP | y, | ||
| SEXP | trans | ||
| ) |
Definition at line 113 of file dgeMatrix.c.
References _, Matrix_DimSym, Matrix_factorSym, and Matrix_xSym.
| SEXP dgeMatrix_exp | ( | SEXP | x | ) |
Matrix exponential - based on the _corrected_ code for Octave's expm function.
| x | real square matrix to exponentiate |
Definition at line 447 of file dgeMatrix.c.
References _, AZERO, Matrix_DimSym, Matrix_xSym, padec, and RE_PERMUTE.
| SEXP dgeMatrix_getDiag | ( | SEXP | x | ) |
Definition at line 178 of file dgeMatrix.c.
References geMatrix_getDiag_1, and geMatrix_getDiag_2.
| SEXP dgeMatrix_LU | ( | SEXP | x, |
| SEXP | warn_singularity | ||
| ) |
Definition at line 242 of file dgeMatrix.c.
References dgeMatrix_LU_().

| SEXP dgeMatrix_LU_ | ( | SEXP | x, |
| Rboolean | warn_sing | ||
| ) |
Definition at line 215 of file dgeMatrix.c.
References _, ALLOC_SLOT(), get_factors(), Matrix_DimSym, Matrix_permSym, Matrix_xSym, set_factors(), and slot_dup.
Referenced by dgeMatrix_determinant(), dgeMatrix_LU(), dgeMatrix_matrix_solve(), dgeMatrix_rcond(), and dgeMatrix_solve().


| SEXP dgeMatrix_matrix_crossprod | ( | SEXP | x, |
| SEXP | y, | ||
| SEXP | trans | ||
| ) |
Definition at line 142 of file dgeMatrix.c.
References _, Matrix_DimSym, Matrix_factorSym, and Matrix_xSym.
| SEXP dgeMatrix_matrix_mm | ( | SEXP | a, |
| SEXP | bP, | ||
| SEXP | right | ||
| ) |
Definition at line 347 of file dgeMatrix.c.
References _, ALLOC_SLOT(), Matrix_DimNamesSym, Matrix_DimSym, Matrix_xSym, and mMatrix_as_dgeMatrix().

| SEXP dgeMatrix_matrix_solve | ( | SEXP | a, |
| SEXP | b | ||
| ) |
Definition at line 328 of file dgeMatrix.c.
References _, dgeMatrix_LU_(), dup_mMatrix_as_dgeMatrix(), Matrix_DimSym, Matrix_permSym, and Matrix_xSym.

| SEXP dgeMatrix_norm | ( | SEXP | obj, |
| SEXP | type | ||
| ) |
Definition at line 59 of file dgeMatrix.c.
References get_norm().

| SEXP dgeMatrix_rcond | ( | SEXP | obj, |
| SEXP | type | ||
| ) |
Definition at line 64 of file dgeMatrix.c.
References _, dgeMatrix_LU_(), get_norm(), La_rcond_type(), Matrix_DimSym, and Matrix_xSym.

| SEXP dgeMatrix_Schur | ( | SEXP | x, |
| SEXP | vectors | ||
| ) |
Definition at line 577 of file dgeMatrix.c.
References _, Alloca, Matrix_DimSym, and Matrix_xSym.
| SEXP dgeMatrix_solve | ( | SEXP | a | ) |
Definition at line 280 of file dgeMatrix.c.
References _, dgeMatrix_LU_(), get_norm(), Matrix_DimSym, Matrix_permSym, Matrix_xSym, and slot_dup.

| SEXP dgeMatrix_svd | ( | SEXP | x, |
| SEXP | nnu, | ||
| SEXP | nnv | ||
| ) |
Definition at line 391 of file dgeMatrix.c.
References Alloca, dgesdd(), Matrix_DimSym, and Matrix_xSym.

| SEXP dgeMatrix_validate | ( | SEXP | obj | ) |
Definition at line 26 of file dgeMatrix.c.
References _, dense_nonpacked_validate(), and Matrix_factorSym.

| SEXP dMatrix_validate | ( | SEXP | obj | ) |
Definition at line 3 of file dgeMatrix.c.
References _, dngettext, Matrix_DimSym, and Matrix_xSym.
| static double get_norm | ( | SEXP | obj, |
| const char * | typstr | ||
| ) | [static] |
Definition at line 40 of file dgeMatrix.c.
References any_NA_in_x(), La_norm_type(), Matrix_DimSym, and Matrix_xSym.
Referenced by dgeMatrix_norm(), dgeMatrix_rcond(), and dgeMatrix_solve().


| SEXP lgeMatrix_getDiag | ( | SEXP | x | ) |
Definition at line 200 of file dgeMatrix.c.
References geMatrix_getDiag_1, and geMatrix_getDiag_2.
const double padec[] [static] |
{
5.0000000000000000e-1,
1.1666666666666667e-1,
1.6666666666666667e-2,
1.6025641025641026e-3,
1.0683760683760684e-4,
4.8562548562548563e-6,
1.3875013875013875e-7,
1.9270852604185938e-9,
}
Definition at line 428 of file dgeMatrix.c.
Referenced by dgeMatrix_exp().