Matrix r4655
|
Go to the source code of this file.
Macros | |
#define | BAND_CASES(_DO_) |
#define | BAND2(_PREFIX_, _CTYPE_, _PTR_) _PREFIX_ ## band2(_PTR_(x1), m, n, a, b, di) |
#define | BAND1(_PREFIX_, _CTYPE_, _PTR_) _PREFIX_ ## band1(_PTR_(x1), n, a, b, ul1, di) |
#define | DCPY2(_PREFIX_, _CTYPE_, _PTR_) |
#define | DCPY1(_PREFIX_, _CTYPE_, _PTR_) |
#define | DG_LOOP(_CTYPE_, _PTR_, _ONE_) |
#define | DS_LOOP(_CTYPE_, _PTR_) |
#define | TRANS_LOOP(_CTYPE_, _PTR_) |
#define | DCPY(_PREFIX_, _CTYPE_, _PTR_) |
#define | SP_LOOP(_CTYPE_, _PTR_, _INCREMENT_, _SCALE1_, _ONE_) |
#define | SP_LOOP(_CTYPE_, _PTR_, _INCREMENT_, _ASSIGN_, _ZERO_) |
#define | IS_LOOP(_CTYPE_, _PTR_, _NOTREAL_, _NOTCONJ_) |
#define | IT_LOOP(_CTYPE_, _PTR_, _ISNZ_) |
#define | ID_LOOP(_CTYPE_, _PTR_, _ISNZ_) |
#define | CAST_PATTERN(_X_) (_X_ != 0) |
#define | CAST_LOGICAL(_X_) (_X_ != 0) |
#define | CAST_INTEGER(_X_) _X_ |
#define | CAST_REAL(_X_) _X_ |
#define | CAST_COMPLEX(_X_) _X_ |
#define | SUM_CASES |
#define | SUM_TYPEOF(c) (c == 'z') ? CPLXSXP : ((mean || c == 'd' || c == 'i') ? REALSXP : INTSXP) |
#define | SUM_LOOP(_CTYPE0_, _PTR0_, _CTYPE1_, _PTR1_, _ZERO_, _ONE_, _NA_, _ISNA_, _CAST_, _INCREMENT_, _SCALE2_) |
#define | SUM_KERNEL(_FOR_, _NA_, _ISNA_, _CAST_, _INCREMENT_, _SCALE2_) |
#define | SUM_LOOP(_CTYPE0_, _PTR0_, _CTYPE1_, _PTR1_, _ZERO_, _ONE_, _NA_, _ISNA_, _CAST_, _INCREMENT_, _SCALE2_) |
#define | SUM_KERNEL(_FOR_, _NA_, _ISNA_, _CAST_, _INCREMENT_) |
#define | TRY_INCREMENT(_LABEL_) |
#define | LONGDOUBLE_AS_DOUBLE(v) (v > DBL_MAX) ? R_PosInf : ((v < -DBL_MAX) ? R_NegInf : (double) v); |
#define | SUM_LOOP |
#define | SUM_KERNEL(_FOR_) |
#define | SUM_KERNEL(_FOR_) |
#define | SUM_KERNEL(_FOR_) |
#define | SUM_KERNEL(_FOR_) |
#define | SUM_KERNEL(_FOR_) |
#define | SUM_KERNEL(_FOR_) |
#define | PROD_LOOP |
#define | PROD_KERNEL(_FOR_) |
#define | PROD_KERNEL(_FOR_) |
#define | PROD_KERNEL(_FOR_) |
#define | PROD_KERNEL(_FOR_) |
Functions | |
SEXP | dense_band (SEXP from, const char *class, int a, int b) |
SEXP | R_dense_band (SEXP from, SEXP k1, SEXP k2) |
SEXP | dense_diag_get (SEXP obj, const char *class, int names) |
SEXP | R_dense_diag_get (SEXP obj, SEXP names) |
SEXP | dense_diag_set (SEXP from, const char *class, SEXP value, int new) |
SEXP | R_dense_diag_set (SEXP from, SEXP value) |
SEXP | dense_transpose (SEXP from, const char *class) |
SEXP | R_dense_transpose (SEXP from) |
SEXP | dense_force_symmetric (SEXP from, const char *class, char ul) |
SEXP | R_dense_force_symmetric (SEXP from, SEXP uplo) |
SEXP | dense_symmpart (SEXP from, const char *class) |
SEXP | R_dense_symmpart (SEXP from) |
SEXP | dense_skewpart (SEXP from, const char *class) |
SEXP | R_dense_skewpart (SEXP from) |
int | dense_is_symmetric (SEXP obj, const char *class, int checkDN) |
SEXP | R_dense_is_symmetric (SEXP obj, SEXP checkDN) |
int | dense_is_triangular (SEXP obj, const char *class, int upper) |
SEXP | R_dense_is_triangular (SEXP obj, SEXP upper) |
int | dense_is_diagonal (SEXP obj, const char *class) |
SEXP | R_dense_is_diagonal (SEXP obj) |
static void | dense_colsum (SEXP x, const char *class, int m, int n, char ul, char di, int narm, int mean, SEXP res) |
static void | dense_rowsum (SEXP x, const char *class, int m, int n, char ul, char di, int narm, int mean, SEXP res) |
SEXP | dense_marginsum (SEXP obj, const char *class, int margin, int narm, int mean) |
SEXP | R_dense_marginsum (SEXP obj, SEXP margin, SEXP narm, SEXP mean) |
SEXP | dense_sum (SEXP obj, const char *class, int narm) |
SEXP | R_dense_sum (SEXP obj, SEXP narm) |
SEXP | dense_prod (SEXP obj, const char *class, int narm) |
SEXP | R_dense_prod (SEXP obj, SEXP narm) |
#define BAND1 | ( | _PREFIX_, | |
_CTYPE_, | |||
_PTR_ | |||
) | _PREFIX_ ## band1(_PTR_(x1), n, a, b, ul1, di) |
#define BAND2 | ( | _PREFIX_, | |
_CTYPE_, | |||
_PTR_ | |||
) | _PREFIX_ ## band2(_PTR_(x1), m, n, a, b, di) |
#define BAND_CASES | ( | _DO_ | ) |
#define DCPY | ( | _PREFIX_, | |
_CTYPE_, | |||
_PTR_ | |||
) |
#define DCPY1 | ( | _PREFIX_, | |
_CTYPE_, | |||
_PTR_ | |||
) |
#define DCPY2 | ( | _PREFIX_, | |
_CTYPE_, | |||
_PTR_ | |||
) |
#define DG_LOOP | ( | _CTYPE_, | |
_PTR_, | |||
_ONE_ | |||
) |
#define DS_LOOP | ( | _CTYPE_, | |
_PTR_ | |||
) |
#define ID_LOOP | ( | _CTYPE_, | |
_PTR_, | |||
_ISNZ_ | |||
) |
#define IS_LOOP | ( | _CTYPE_, | |
_PTR_, | |||
_NOTREAL_, | |||
_NOTCONJ_ | |||
) |
#define IT_LOOP | ( | _CTYPE_, | |
_PTR_, | |||
_ISNZ_ | |||
) |
#define LONGDOUBLE_AS_DOUBLE | ( | v | ) | (v > DBL_MAX) ? R_PosInf : ((v < -DBL_MAX) ? R_NegInf : (double) v); |
#define PROD_KERNEL | ( | _FOR_ | ) |
#define PROD_KERNEL | ( | _FOR_ | ) |
#define PROD_KERNEL | ( | _FOR_ | ) |
#define PROD_KERNEL | ( | _FOR_ | ) |
#define PROD_LOOP |
#define SP_LOOP | ( | _CTYPE_, | |
_PTR_, | |||
_INCREMENT_, | |||
_ASSIGN_, | |||
_ZERO_ | |||
) |
#define SP_LOOP | ( | _CTYPE_, | |
_PTR_, | |||
_INCREMENT_, | |||
_SCALE1_, | |||
_ONE_ | |||
) |
#define SUM_KERNEL | ( | _FOR_ | ) |
#define SUM_KERNEL | ( | _FOR_ | ) |
#define SUM_KERNEL | ( | _FOR_ | ) |
#define SUM_KERNEL | ( | _FOR_ | ) |
#define SUM_KERNEL | ( | _FOR_ | ) |
#define SUM_KERNEL | ( | _FOR_ | ) |
#define SUM_KERNEL | ( | _FOR_, | |
_NA_, | |||
_ISNA_, | |||
_CAST_, | |||
_INCREMENT_ | |||
) |
#define SUM_KERNEL | ( | _FOR_, | |
_NA_, | |||
_ISNA_, | |||
_CAST_, | |||
_INCREMENT_, | |||
_SCALE2_ | |||
) |
#define SUM_LOOP | ( | _CTYPE0_, | |
_PTR0_, | |||
_CTYPE1_, | |||
_PTR1_, | |||
_ZERO_, | |||
_ONE_, | |||
_NA_, | |||
_ISNA_, | |||
_CAST_, | |||
_INCREMENT_, | |||
_SCALE2_ | |||
) |
#define SUM_LOOP | ( | _CTYPE0_, | |
_PTR0_, | |||
_CTYPE1_, | |||
_PTR1_, | |||
_ZERO_, | |||
_ONE_, | |||
_NA_, | |||
_ISNA_, | |||
_CAST_, | |||
_INCREMENT_, | |||
_SCALE2_ | |||
) |
#define SUM_LOOP |
#define TRANS_LOOP | ( | _CTYPE_, | |
_PTR_ | |||
) |
#define TRY_INCREMENT | ( | _LABEL_ | ) |
SEXP dense_band | ( | SEXP | from, |
const char * | class, | ||
int | a, | ||
int | b | ||
) |
Definition at line 5 of file dense.c.
References BAND1, BAND2, BAND_CASES, cl, DCPY1, DCPY2, dense_as_general(), dense_transpose(), GET_SLOT, Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, newObject(), SET_SLOT, and set_symmetrized_DimNames().
Referenced by R_dense_band().
|
static |
SEXP dense_diag_get | ( | SEXP | obj, |
const char * | class, | ||
int | names | ||
) |
Definition at line 226 of file dense.c.
References DG_LOOP, equal_character_vectors(), GET_SLOT, Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, and Matrix_zone.
Referenced by R_dense_diag_get().
SEXP dense_diag_set | ( | SEXP | from, |
const char * | class, | ||
SEXP | value, | ||
int | new | ||
) |
Definition at line 327 of file dense.c.
References DS_LOOP, GET_SLOT, Matrix_DimNamesSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, newObject(), and SET_SLOT.
Referenced by R_dense_diag_set().
SEXP dense_force_symmetric | ( | SEXP | from, |
const char * | class, | ||
char | ul | ||
) |
Definition at line 580 of file dense.c.
References _, cl, conjugate(), DCPY, dense_transpose(), GET_SLOT, Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, newObject(), SET_SLOT, and set_symmetrized_DimNames().
Referenced by R_dense_force_symmetric().
int dense_is_diagonal | ( | SEXP | obj, |
const char * | class | ||
) |
Definition at line 1251 of file dense.c.
References GET_SLOT, ID_LOOP, ISNZ_COMPLEX, ISNZ_INTEGER, ISNZ_LOGICAL, ISNZ_PATTERN, ISNZ_REAL, Matrix_DimSym, Matrix_uploSym, and Matrix_xSym.
Referenced by dense_is_symmetric(), dense_is_triangular(), and R_dense_is_diagonal().
int dense_is_symmetric | ( | SEXP | obj, |
const char * | class, | ||
int | checkDN | ||
) |
Definition at line 1021 of file dense.c.
References dense_is_diagonal(), DimNames_is_symmetric(), GET_SLOT, IS_LOOP, Matrix_DimNamesSym, Matrix_DimSym, Matrix_xSym, NOTCONJ_COMPLEX, NOTCONJ_INTEGER, NOTCONJ_LOGICAL, NOTCONJ_PATTERN, NOTCONJ_REAL, NOTREAL_COMPLEX, NOTREAL_INTEGER, NOTREAL_LOGICAL, NOTREAL_PATTERN, and NOTREAL_REAL.
Referenced by R_dense_is_symmetric().
int dense_is_triangular | ( | SEXP | obj, |
const char * | class, | ||
int | upper | ||
) |
Definition at line 1109 of file dense.c.
References dense_is_diagonal(), GET_SLOT, ISNZ_COMPLEX, ISNZ_INTEGER, ISNZ_LOGICAL, ISNZ_PATTERN, ISNZ_REAL, IT_LOOP, Matrix_DimSym, Matrix_uploSym, and Matrix_xSym.
Referenced by R_dense_is_triangular().
SEXP dense_marginsum | ( | SEXP | obj, |
const char * | class, | ||
int | margin, | ||
int | narm, | ||
int | mean | ||
) |
Definition at line 1622 of file dense.c.
References dense_colsum(), dense_rowsum(), GET_SLOT, get_symmetrized_DimNames(), Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, and SUM_TYPEOF.
Referenced by R_dense_marginsum().
SEXP dense_prod | ( | SEXP | obj, |
const char * | class, | ||
int | narm | ||
) |
Definition at line 1934 of file dense.c.
References GET_SLOT, LONGDOUBLE_AS_DOUBLE, Matrix_diagSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, and PROD_LOOP.
Referenced by R_dense_prod().
|
static |
Definition at line 1519 of file dense.c.
References Matrix_Calloc, Matrix_Free, and SUM_CASES.
Referenced by dense_marginsum().
SEXP dense_skewpart | ( | SEXP | from, |
const char * | class | ||
) |
Definition at line 854 of file dense.c.
References _, ASSIGN_COMPLEX, ASSIGN_REAL, cl, dense_as_kind(), GET_SLOT, INCREMENT_COMPLEX, INCREMENT_REAL, Matrix_DimNamesSym, Matrix_DimSym, Matrix_memset(), Matrix_pSym, Matrix_uploSym, Matrix_xSym, Matrix_zzero, newObject(), SET_SLOT, set_symmetrized_DimNames(), SP_LOOP, and zeroRe().
Referenced by R_dense_skewpart().
SEXP dense_sum | ( | SEXP | obj, |
const char * | class, | ||
int | narm | ||
) |
Definition at line 1708 of file dense.c.
References GET_SLOT, LONGDOUBLE_AS_DOUBLE, Matrix_diagSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, SUM_LOOP, and TRY_INCREMENT.
Referenced by R_dense_sum().
SEXP dense_symmpart | ( | SEXP | from, |
const char * | class | ||
) |
Definition at line 702 of file dense.c.
References _, cl, dense_as_kind(), GET_SLOT, INCREMENT_COMPLEX, INCREMENT_REAL, Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, Matrix_zone, newObject(), SCALE1_COMPLEX, SCALE1_REAL, SET_SLOT, set_symmetrized_DimNames(), SP_LOOP, and zeroIm().
Referenced by R_dense_symmpart().
SEXP dense_transpose | ( | SEXP | from, |
const char * | class | ||
) |
Definition at line 466 of file dense.c.
References GET_SLOT, Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_factorsSym, Matrix_sdSym, Matrix_uploSym, Matrix_xSym, newObject(), set_reversed_DimNames(), SET_SLOT, and TRANS_LOOP.
Referenced by dense_band(), dense_force_symmetric(), R_dense_transpose(), and R_diagonal_matmult().
SEXP R_dense_band | ( | SEXP | from, |
SEXP | k1, | ||
SEXP | k2 | ||
) |
Definition at line 189 of file dense.c.
References _, dense_band(), ERROR_INVALID_CLASS, GET_SLOT, matrix_as_dense(), Matrix_DimSym, valid, and VALID_DENSE.
SEXP R_dense_diag_get | ( | SEXP | obj, |
SEXP | names | ||
) |
Definition at line 312 of file dense.c.
References _, dense_diag_get(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.
SEXP R_dense_diag_set | ( | SEXP | from, |
SEXP | value | ||
) |
Definition at line 411 of file dense.c.
References _, dense_as_kind(), dense_diag_set(), ERROR_INVALID_CLASS, GET_SLOT, kindToType(), Matrix_DimSym, typeToKind(), valid, and VALID_DENSE.
SEXP R_dense_force_symmetric | ( | SEXP | from, |
SEXP | uplo | ||
) |
Definition at line 684 of file dense.c.
References _, dense_force_symmetric(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.
SEXP R_dense_is_diagonal | ( | SEXP | obj | ) |
Definition at line 1355 of file dense.c.
References dense_is_diagonal(), ERROR_INVALID_CLASS, matrix_as_dense(), valid, and VALID_DENSE.
SEXP R_dense_is_symmetric | ( | SEXP | obj, |
SEXP | checkDN | ||
) |
Definition at line 1086 of file dense.c.
References _, dense_is_symmetric(), ERROR_INVALID_CLASS, matrix_as_dense(), valid, and VALID_DENSE.
SEXP R_dense_is_triangular | ( | SEXP | obj, |
SEXP | upper | ||
) |
Definition at line 1218 of file dense.c.
References _, dense_is_triangular(), ERROR_INVALID_CLASS, matrix_as_dense(), valid, and VALID_DENSE.
SEXP R_dense_marginsum | ( | SEXP | obj, |
SEXP | margin, | ||
SEXP | narm, | ||
SEXP | mean | ||
) |
Definition at line 1662 of file dense.c.
References _, dense_marginsum(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.
SEXP R_dense_prod | ( | SEXP | obj, |
SEXP | narm | ||
) |
Definition at line 2114 of file dense.c.
References _, dense_prod(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.
SEXP R_dense_skewpart | ( | SEXP | from | ) |
Definition at line 1011 of file dense.c.
References dense_skewpart(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.
SEXP R_dense_sum | ( | SEXP | obj, |
SEXP | narm | ||
) |
Definition at line 1919 of file dense.c.
References _, dense_sum(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.
SEXP R_dense_symmpart | ( | SEXP | from | ) |
Definition at line 844 of file dense.c.
References dense_symmpart(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.
SEXP R_dense_transpose | ( | SEXP | from | ) |
Definition at line 568 of file dense.c.
References dense_transpose(), ERROR_INVALID_CLASS, valid, and VALID_DENSE.