Matrix $Rev: 2718 $ at $LastChangedDate: 2011-10-06 11:45:17 +0200 (Thu, 06 Oct 2011) $
dtrMatrix.c File Reference
#include "dtrMatrix.h"
Include dependency graph for dtrMatrix.c:

Go to the source code of this file.

Defines

#define GET_trMatrix_Diag(_C_TYPE_, _SEXPTYPE_, _SEXP_, _ONE_)

Functions

SEXP dtrMatrix_as_dtpMatrix (SEXP from)
SEXP dtrMatrix_as_matrix (SEXP from, SEXP keep_dimnames)
SEXP dtrMatrix_chol2inv (SEXP a)
SEXP dtrMatrix_dtrMatrix_mm (SEXP a, SEXP b, SEXP right, SEXP trans)
SEXP dtrMatrix_getDiag (SEXP x)
SEXP dtrMatrix_matrix_mm (SEXP a, SEXP b, SEXP right, SEXP trans)
SEXP dtrMatrix_matrix_solve (SEXP a, SEXP b)
SEXP dtrMatrix_norm (SEXP obj, SEXP type)
SEXP dtrMatrix_rcond (SEXP obj, SEXP type)
SEXP dtrMatrix_solve (SEXP a)
SEXP dtrMatrix_validate (SEXP obj)
static double get_norm (SEXP obj, const char *typstr)
SEXP ltrMatrix_getDiag (SEXP x)
SEXP triangularMatrix_validate (SEXP obj)

Define Documentation

#define GET_trMatrix_Diag (   _C_TYPE_,
  _SEXPTYPE_,
  _SEXP_,
  _ONE_ 
)
Value:
int i, n = INTEGER(GET_SLOT(x, Matrix_DimSym))[0];                      \
    SEXP x_x = GET_SLOT(x, Matrix_xSym);                                \
                                                                        \
    SEXP ret = PROTECT(allocVector(_SEXPTYPE_, n));                     \
    _C_TYPE_ *rv = _SEXP_(ret),                                         \
             *xv = _SEXP_(x_x);                                         \
                                                                        \
    if ('U' == diag_P(x)[0]) {                                          \
        for (i = 0; i < n; i++) rv[i] = _ONE_;                          \
    } else {                                                            \
        for (i = 0; i < n; i++) rv[i] = xv[i * (n + 1)];                \
    }                                                                   \
    UNPROTECT(1);                                                       \
    return ret

Definition at line 214 of file dtrMatrix.c.

Referenced by dtrMatrix_getDiag(), and ltrMatrix_getDiag().


Function Documentation

SEXP dtrMatrix_as_dtpMatrix ( SEXP  from)

Definition at line 239 of file dtrMatrix.c.

References ALLOC_SLOT(), LOW, Matrix_diagSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, NUN, UNT, and UPP.

Here is the call graph for this function:

SEXP dtrMatrix_as_matrix ( SEXP  from,
SEXP  keep_dimnames 
)

Definition at line 200 of file dtrMatrix.c.

References make_d_matrix_triangular(), Matrix_DimNamesSym, Matrix_DimSym, and Matrix_xSym.

Here is the call graph for this function:

SEXP dtrMatrix_chol2inv ( SEXP  a)
SEXP dtrMatrix_dtrMatrix_mm ( SEXP  a,
SEXP  b,
SEXP  right,
SEXP  trans 
)

Definition at line 135 of file dtrMatrix.c.

References _, ALLOC_SLOT(), diag_P, dup_mMatrix_as_dgeMatrix(), make_d_matrix_triangular(), Matrix_diagSym, Matrix_DimSym, Matrix_uploSym, Matrix_xSym, SET_DimNames, and uplo_P.

Here is the call graph for this function:

SEXP dtrMatrix_getDiag ( SEXP  x)

Definition at line 231 of file dtrMatrix.c.

References GET_trMatrix_Diag.

SEXP dtrMatrix_matrix_mm ( SEXP  a,
SEXP  b,
SEXP  right,
SEXP  trans 
)

Definition at line 107 of file dtrMatrix.c.

References _, diag_P, dup_mMatrix_as_dgeMatrix(), Matrix_DimSym, Matrix_xSym, and uplo_P.

Here is the call graph for this function:

SEXP dtrMatrix_matrix_solve ( SEXP  a,
SEXP  b 
)

Definition at line 89 of file dtrMatrix.c.

References _, diag_P, dup_mMatrix_as_dgeMatrix(), Matrix_DimSym, Matrix_xSym, and uplo_P.

Here is the call graph for this function:

SEXP dtrMatrix_norm ( SEXP  obj,
SEXP  type 
)

Definition at line 43 of file dtrMatrix.c.

References get_norm().

Here is the call graph for this function:

SEXP dtrMatrix_rcond ( SEXP  obj,
SEXP  type 
)

Definition at line 48 of file dtrMatrix.c.

References diag_P, La_rcond_type(), Matrix_DimSym, Matrix_xSym, and uplo_P.

Here is the call graph for this function:

SEXP dtrMatrix_solve ( SEXP  a)

Definition at line 62 of file dtrMatrix.c.

References diag_P, Matrix_DimSym, Matrix_xSym, and uplo_P.

SEXP dtrMatrix_validate ( SEXP  obj)

Definition at line 20 of file dtrMatrix.c.

References dense_nonpacked_validate().

Here is the call graph for this function:

static double get_norm ( SEXP  obj,
const char *  typstr 
) [static]

Definition at line 28 of file dtrMatrix.c.

References diag_P, La_norm_type(), Matrix_DimSym, Matrix_xSym, and uplo_P.

Referenced by dtrMatrix_norm().

Here is the call graph for this function:

Here is the caller graph for this function:

SEXP ltrMatrix_getDiag ( SEXP  x)

Definition at line 235 of file dtrMatrix.c.

References GET_trMatrix_Diag.

SEXP triangularMatrix_validate ( SEXP  obj)

Definition at line 5 of file dtrMatrix.c.

References _, check_scalar_string(), Matrix_diagSym, Matrix_DimSym, and Matrix_uploSym.

Referenced by dtpMatrix_validate().

Here is the call graph for this function:

Here is the caller graph for this function: