Matrix $Rev: 2718 $ at $LastChangedDate: 2011-10-06 11:45:17 +0200 (Thu, 06 Oct 2011) $
Mutils.h File Reference
#include <stdint.h>
#include <ctype.h>
#include <R.h>
#include <Rversion.h>
#include <Rdefines.h>
#include "Syms.h"
#include "t_sparseVector.c"
Include dependency graph for Mutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _(String)   (String)
#define _dspV_
 Accessing *sparseVectors : fast (and recycling) v[i] for v = ?sparseVector:
#define _ispV_
#define _lspV_
#define _nspV_
#define _zspV_
#define Alloca(n, t)   (t *) alloca( (size_t) ( (n) * sizeof(t) ) )
#define AZERO(x, n)   {int _I_, _SZ_ = (n); for(_I_ = 0; _I_ < _SZ_; _I_++) (x)[_I_] = 0;}
#define class_P(_x_)   CHAR(asChar(getAttrib(_x_, R_ClassSymbol)))
#define CMJ   CblasColMajor
#define CTR   CblasConjTrans
#define DECLARE_AND_GET_X_SLOT(__C_TYPE, __SEXP)   __C_TYPE *xx = __SEXP(GET_SLOT(x, Matrix_xSym))
#define diag_P(_x_)   CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_diagSym), 0))
#define dngettext(pkg, String, StringP, N)   (N > 1 ? StringP : String)
#define FULL_TO_PACKED(TYPE)
#define LFT   CblasLeft
#define LOW   CblasLower
#define Matrix_check_class_and_super   R_check_class_and_super
#define MATRIX_VALID_CHMfactor   "dCHMsuper", "dCHMsimpl", "nCHMsuper", "nCHMsimpl"
#define MATRIX_VALID_Csparse
#define MATRIX_VALID_dense
#define MATRIX_VALID_Rsparse
#define MATRIX_VALID_Tsparse
#define NTR   CblasNoTrans
#define NUN   CblasNonUnit
#define PACKED_LENGTH(n)   ((n) * ((n) + 1))/2
#define PACKED_TO_FULL(TYPE)
#define Real_kind(_x_)
#define Real_KIND(_x_)
#define Real_KIND2(_x_)
#define RGT   CblasRight
#define RMJ   CblasRowMajor
#define SET_DimNames(dest, src)   slot_dup(dest, src, Matrix_DimNamesSym)
#define slot_dup(dest, src, sym)   SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym)))
#define slot_dup_if_has(dest, src, sym)
#define slot_nonNull_dup(dest, src, sym)
#define TRN   CblasTrans
#define UNT   CblasUnit
#define uplo_P(_x_)   CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_uploSym), 0))
#define UPP   CblasUpper

Enumerations

enum  CBLAS_DIAG { CblasNonUnit = 131, CblasUnit = 132 }
enum  CBLAS_ORDER { CblasRowMajor = 101, CblasColMajor = 102 }
enum  CBLAS_SIDE { CblasLeft = 141, CblasRight = 142 }
enum  CBLAS_TRANSPOSE { CblasNoTrans = 111, CblasTrans = 112, CblasConjTrans = 113 }
enum  CBLAS_UPLO { CblasUpper = 121, CblasLower = 122 }
enum  x_slot_kind { x_pattern = -1, x_double = 0, x_logical = 1, x_integer = 2, x_complex = 3 }

Functions

static R_INLINE SEXP ALLOC_SLOT (SEXP obj, SEXP nm, SEXPTYPE type, int length)
 Allocate an SEXP of given type and length, assign it as slot nm in the object, and return the SEXP.
static R_INLINE Rboolean any_NA_in_x (SEXP obj)
 Check if slot(obj, "x") contains any NA (or NaN).
SEXP as_det_obj (double val, int log, int sign)
SEXP check_scalar_string (SEXP sP, char *vals, char *nm)
 Check validity of 1-letter string from a set of possible values (typically used in S4 validity method)
void d_packed_getDiag (double *dest, SEXP x, int n)
 Copy the diagonal elements of the packed denseMatrix x to dest.
SEXP dense_nonpacked_validate (SEXP obj)
SEXP dup_mMatrix_as_dgeMatrix (SEXP A)
SEXP dup_mMatrix_as_geMatrix (SEXP A)
Rboolean equal_string_vectors (SEXP s1, SEXP s2)
static R_INLINE int * expand_cmprPt (int ncol, const int mp[], int mj[])
 Expand compressed pointers in the array mp into a full set of indices in the array mj.
 FULL_TO_PACKED (double)
 FULL_TO_PACKED (int)
double get_double_by_name (SEXP obj, char *nm)
SEXP get_factors (SEXP obj, char *nm)
void l_packed_getDiag (int *dest, SEXP x, int n)
SEXP m_encodeInd (SEXP ij, SEXP di, SEXP chk_bnds)
 Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.
SEXP m_encodeInd2 (SEXP i, SEXP j, SEXP di, SEXP chk_bnds)
 Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.
void make_d_matrix_symmetric (double *to, SEXP from)
void make_d_matrix_triangular (double *x, SEXP from)
void make_i_matrix_symmetric (int *to, SEXP from)
void make_i_matrix_triangular (int *x, SEXP from)
static R_INLINE int Matrix_check_class (char *class, const char **valid)
 Return the 0-based index of a string match in a vector of strings terminated by an empty string.
int Matrix_check_class_etc (SEXP x, const char **valid)
 These are the ones users should use -- is() versions, also looking at super classes:
SEXP Matrix_expand_pointers (SEXP pP)
SEXP Matrix_getElement (SEXP list, char *nm)
 Return the element of a given name from a named list.
static R_INLINE SEXP mMatrix_as_dgeMatrix (SEXP A)
static R_INLINE SEXP mMatrix_as_geMatrix (SEXP A)
SEXP new_dgeMatrix (int nrow, int ncol)
static R_INLINE int packed_ncol (int len)
 Check for valid length of a packed triangular array and return the corresponding number of columns.
 PACKED_TO_FULL (int)
 PACKED_TO_FULL (double)
SEXP set_double_by_name (SEXP obj, double val, char *nm)
SEXP set_factors (SEXP obj, SEXP val, char *nm)
SEXP symmetricMatrix_validate (SEXP obj)
void tr_d_packed_getDiag (double *dest, SEXP x)
void tr_l_packed_getDiag (int *dest, SEXP x)
SEXP triangularMatrix_validate (SEXP obj)

Define Documentation

#define _ (   String)    (String)

Definition at line 20 of file Mutils.h.

Referenced by as_cholmod_factor(), as_cholmod_sparse(), as_cholmod_triplet(), check_scalar_string(), checkGivens(), chm_dense_to_matrix(), chm_dense_to_SEXP(), chm_diagN2U(), chm_factor_ldetL2(), chm_factor_to_SEXP(), chm_factor_update(), CHM_set_common_env(), chm_sparse_to_SEXP(), chm_triplet_to_SEXP(), CHMfactor_solve(), CHMfactor_spsolve(), CHMfactor_to_sparse(), compressed_to_TMatrix(), create_Csparse(), csp_eye(), Csparse_crossprod(), Csparse_drop(), Csparse_MatrixMarket(), Csparse_subassign(), Csparse_submatrix(), Csparse_symmetric_to_general(), Csparse_validate_(), ddense_skewpart(), ddense_symmpart(), dense_band(), dense_nonpacked_validate(), dense_to_symmetric(), dgCMatrix_cholsol(), dgCMatrix_matrix_solve(), dgCMatrix_QR(), dgCMatrix_qrsol(), dgeMatrix_determinant(), dgeMatrix_dgeMatrix_crossprod(), dgeMatrix_dtpMatrix_mm(), dgeMatrix_exp(), dgeMatrix_LU_(), dgeMatrix_matrix_crossprod(), dgeMatrix_matrix_mm(), dgeMatrix_matrix_solve(), dgeMatrix_rcond(), dgeMatrix_Schur(), dgeMatrix_solve(), dgeMatrix_validate(), diag_tC_ptr(), dMatrix_validate(), dpoMatrix_chol(), dpoMatrix_dgeMatrix_solve(), dpoMatrix_matrix_solve(), dpoMatrix_validate(), dppMatrix_chol(), dppMatrix_matrix_solve(), dsCMatrix_to_dgTMatrix(), dspMatrix_matrix_mm(), dspMatrix_matrix_solve(), dspMatrix_trf(), dspMatrix_validate(), dsyMatrix_matrix_mm(), dsyMatrix_matrix_solve(), dsyMatrix_trf(), dtCMatrix_matrix_solve(), dtCMatrix_sparse_solve(), dtpMatrix_matrix_mm(), dtpMatrix_matrix_solve(), dtpMatrix_validate(), dtrMatrix_dtrMatrix_mm(), dtrMatrix_matrix_mm(), dtrMatrix_matrix_solve(), dup_mMatrix_as_dgeMatrix(), dup_mMatrix_as_geMatrix(), equal_string_vectors(), get_double_by_name(), get_factors(), getGivens(), install_lu(), internal_chm_factor(), La_norm_type(), La_rcond_type(), lapack_qr(), left_cyclic(), lsq_dense_Chol(), lsq_dense_QR(), m_encodeInd(), m_encodeInd2(), Matrix_as_cs(), Matrix_check_class_etc(), Matrix_cs_to_SEXP(), nz2Csparse(), packed_ncol(), R_cholmod_error(), R_cholmod_start(), R_init_Matrix(), R_to_CMatrix(), Rsparse_validate(), set_double_by_name(), set_factors(), sparseQR_Qmult(), sparseQR_validate(), symmetricMatrix_validate(), tCMatrix_validate(), triangularMatrix_validate(), tRMatrix_validate(), Tsparse_validate(), tTMatrix_validate(), xCMatrix_validate(), xRMatrix_validate(), and xTMatrix_validate().

#define _dspV_

Accessing *sparseVectors : fast (and recycling) v[i] for v = ?sparseVector:

-> ./sparseVector.c -> ./t_sparseVector.c :

Definition at line 330 of file Mutils.h.

#define _ispV_

Definition at line 333 of file Mutils.h.

#define _lspV_

Definition at line 336 of file Mutils.h.

#define _nspV_

Definition at line 339 of file Mutils.h.

#define _zspV_

Definition at line 342 of file Mutils.h.

#define Alloca (   n,
 
)    (t *) alloca( (size_t) ( (n) * sizeof(t) ) )
#define AZERO (   x,
 
)    {int _I_, _SZ_ = (n); for(_I_ = 0; _I_ < _SZ_; _I_++) (x)[_I_] = 0;}
#define CMJ   CblasColMajor

Definition at line 46 of file Mutils.h.

#define CTR   CblasConjTrans

Definition at line 49 of file Mutils.h.

#define DECLARE_AND_GET_X_SLOT (   __C_TYPE,
  __SEXP 
)    __C_TYPE *xx = __SEXP(GET_SLOT(x, Matrix_xSym))

Definition at line 142 of file Mutils.h.

#define dngettext (   pkg,
  String,
  StringP,
 
)    (N > 1 ? StringP : String)

Definition at line 22 of file Mutils.h.

Referenced by dMatrix_validate().

#define FULL_TO_PACKED (   TYPE)
Value:
TYPE *full_to_packed_ ## TYPE(TYPE *dest, const TYPE *src, int n,       \
                              enum CBLAS_UPLO uplo, enum CBLAS_DIAG diag)

Definition at line 88 of file Mutils.h.

#define LFT   CblasLeft

Definition at line 54 of file Mutils.h.

#define Matrix_check_class_and_super   R_check_class_and_super

Definition at line 314 of file Mutils.h.

Referenced by Matrix_check_class_etc().

#define MATRIX_VALID_CHMfactor   "dCHMsuper", "dCHMsimpl", "nCHMsuper", "nCHMsimpl"

Definition at line 285 of file Mutils.h.

Referenced by as_cholmod_factor().

#define MATRIX_VALID_Csparse
Value:
"dgCMatrix", "dsCMatrix", "dtCMatrix",          \
 "lgCMatrix", "lsCMatrix", "ltCMatrix",         \
 "ngCMatrix", "nsCMatrix", "ntCMatrix",         \
 "zgCMatrix", "zsCMatrix", "ztCMatrix"

Definition at line 267 of file Mutils.h.

Referenced by compressed_to_TMatrix().

#define MATRIX_VALID_dense
Value:
"dmatrix", "dgeMatrix",                 \
        "lmatrix", "lgeMatrix",                 \
        "nmatrix", "ngeMatrix",                 \
        "zmatrix", "zgeMatrix"

Definition at line 261 of file Mutils.h.

#define MATRIX_VALID_Rsparse
Value:
"dgRMatrix", "dsRMatrix", "dtRMatrix",          \
 "lgRMatrix", "lsRMatrix", "ltRMatrix",         \
 "ngRMatrix", "nsRMatrix", "ntRMatrix",         \
 "zgRMatrix", "zsRMatrix", "ztRMatrix"

Definition at line 279 of file Mutils.h.

Referenced by compressed_to_TMatrix(), and R_to_CMatrix().

#define MATRIX_VALID_Tsparse
Value:
"dgTMatrix", "dsTMatrix", "dtTMatrix",          \
 "lgTMatrix", "lsTMatrix", "ltTMatrix",         \
 "ngTMatrix", "nsTMatrix", "ntTMatrix",         \
 "zgTMatrix", "zsTMatrix", "ztTMatrix"

Definition at line 273 of file Mutils.h.

Referenced by as_cholmod_triplet().

#define NTR   CblasNoTrans

Definition at line 47 of file Mutils.h.

#define NUN   CblasNonUnit
#define PACKED_LENGTH (   n)    ((n) * ((n) + 1))/2

Definition at line 103 of file Mutils.h.

#define PACKED_TO_FULL (   TYPE)
Value:
TYPE *packed_to_full_ ## TYPE(TYPE *dest, const TYPE *src,              \
                             int n, enum CBLAS_UPLO uplo)

Definition at line 81 of file Mutils.h.

#define Real_KIND (   _x_)
Value:
(IS_S4_OBJECT(_x_) ? Real_kind(_x_) : \
                         (isReal(_x_) ? x_double : (isLogical(_x_) ? x_logical : -1)))

Definition at line 132 of file Mutils.h.

#define Real_KIND2 (   _x_)
Value:
(IS_S4_OBJECT(_x_) ? Real_kind(_x_) : \
                         (isLogical(_x_) ? x_logical : 0))

Definition at line 135 of file Mutils.h.

Referenced by dense_to_Csparse().

#define RGT   CblasRight

Definition at line 55 of file Mutils.h.

#define RMJ   CblasRowMajor

Definition at line 45 of file Mutils.h.

#define SET_DimNames (   dest,
  src 
)    slot_dup(dest, src, Matrix_DimNamesSym)
#define slot_dup_if_has (   dest,
  src,
  sym 
)
Value:
if(R_has_slot(src, sym))                                        \
        SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym)))

Definition at line 114 of file Mutils.h.

Referenced by nz2Csparse().

#define slot_nonNull_dup (   dest,
  src,
  sym 
)
Value:
if(GET_SLOT(src, sym) != R_NilValue)                    \
        SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym)))

Definition at line 110 of file Mutils.h.

#define TRN   CblasTrans

Definition at line 48 of file Mutils.h.

#define UNT   CblasUnit

Definition at line 53 of file Mutils.h.

Referenced by dtrMatrix_as_dtpMatrix(), and ltrMatrix_as_ltpMatrix().


Enumeration Type Documentation

enum CBLAS_DIAG
Enumerator:
CblasNonUnit 
CblasUnit 

Definition at line 43 of file Mutils.h.

Enumerator:
CblasRowMajor 
CblasColMajor 

Definition at line 40 of file Mutils.h.

enum CBLAS_SIDE
Enumerator:
CblasLeft 
CblasRight 

Definition at line 44 of file Mutils.h.

Enumerator:
CblasNoTrans 
CblasTrans 
CblasConjTrans 

Definition at line 41 of file Mutils.h.

enum CBLAS_UPLO
Enumerator:
CblasUpper 
CblasLower 

Definition at line 42 of file Mutils.h.

Enumerator:
x_pattern 
x_double 
x_logical 
x_integer 
x_complex 

Definition at line 128 of file Mutils.h.


Function Documentation

static R_INLINE SEXP ALLOC_SLOT ( SEXP  obj,
SEXP  nm,
SEXPTYPE  type,
int  length 
) [static]

Allocate an SEXP of given type and length, assign it as slot nm in the object, and return the SEXP.

The validity of this function depends on SET_SLOT not duplicating val when NAMED(val) == 0. If this behavior changes then ALLOC_SLOT must use SET_SLOT followed by GET_SLOT to ensure that the value returned is indeed the SEXP in the slot. NOTE: GET_SLOT(x, what) :== R_do_slot (x, what) ---- SET_SLOT(x, what, value) :== R_do_slot_assign(x, what, value) and the R_do_slot* are in src/main/attrib.c

Parameters:
objobject in which to assign the slot
nmname of the slot, as an R name object
typetype of SEXP to allocate
lengthlength of SEXP to allocate
Returns:
SEXP of given type and length assigned as slot nm in obj

Definition at line 184 of file Mutils.h.

Referenced by chm_dense_to_SEXP(), chm_factor_to_SEXP(), chm_sparse_to_SEXP(), chm_triplet_to_SEXP(), compressed_to_TMatrix(), create_Csparse(), Csparse_subassign(), dgCMatrix_QR(), dgeMatrix_crossprod(), dgeMatrix_LU_(), dgeMatrix_matrix_mm(), dpoMatrix_chol(), dspMatrix_as_dsyMatrix(), dspMatrix_trf(), dsyMatrix_as_dspMatrix(), dsyMatrix_trf(), dtCMatrix_matrix_solve(), dtCMatrix_sparse_solve(), dtpMatrix_as_dtrMatrix(), dtrMatrix_as_dtpMatrix(), dtrMatrix_dtrMatrix_mm(), dup_mMatrix_as_geMatrix(), gCMatrix_colSums(), install_lu(), lspMatrix_as_lsyMatrix(), lsyMatrix_as_lspMatrix(), ltpMatrix_as_ltrMatrix(), ltrMatrix_as_ltpMatrix(), LU_expand(), Matrix_cs_to_SEXP(), new_dgeMatrix(), nz2Csparse(), R_to_CMatrix(), and Tsparse_diagU2N().

Here is the caller graph for this function:

static R_INLINE Rboolean any_NA_in_x ( SEXP  obj) [static]

Check if slot(obj, "x") contains any NA (or NaN).

Parameters:
obja 'Matrix' object with a (double precision) 'x' slot.
Returns:
Rboolean :== any(is.na(slot(obj, "x") )

Definition at line 221 of file Mutils.h.

References Matrix_xSym.

Referenced by get_norm().

Here is the caller graph for this function:

SEXP as_det_obj ( double  val,
int  log,
int  sign 
)

Definition at line 92 of file Mutils.c.

Referenced by dgeMatrix_determinant().

Here is the caller graph for this function:

SEXP check_scalar_string ( SEXP  sP,
char *  vals,
char *  nm 
)

Check validity of 1-letter string from a set of possible values (typically used in S4 validity method)

Parameters:
sP
valsa string containing the possible valid letters
nmthe name of the slot being checked
Returns:
a SEXP, either NULL (= success) or an error message

Definition at line 236 of file Mutils.c.

References _, and SPRINTF.

Referenced by symmetricMatrix_validate(), and triangularMatrix_validate().

Here is the caller graph for this function:

void d_packed_getDiag ( double *  dest,
SEXP  x,
int  n 
)

Copy the diagonal elements of the packed denseMatrix x to dest.

Parameters:
destvector of length ncol(x)
xpointer to an object representing a packed array
nnumber of columns in the matrix represented by x
Returns:
dest

Definition at line 363 of file Mutils.c.

References END_packed_getDiag, and Matrix_xSym.

Referenced by dtpMatrix_getDiag(), and tr_d_packed_getDiag().

Here is the caller graph for this function:

SEXP dense_nonpacked_validate ( SEXP  obj)

Definition at line 292 of file Mutils.c.

References _, Matrix_DimSym, and Matrix_xSym.

Referenced by dgeMatrix_validate(), dsyMatrix_validate(), and dtrMatrix_validate().

Here is the caller graph for this function:

SEXP dup_mMatrix_as_geMatrix ( SEXP  A)
Rboolean equal_string_vectors ( SEXP  s1,
SEXP  s2 
)

Definition at line 268 of file Mutils.c.

References _.

Referenced by ddense_skewpart(), ddense_symmpart(), and dense_to_symmetric().

Here is the caller graph for this function:

static R_INLINE int* expand_cmprPt ( int  ncol,
const int  mp[],
int  mj[] 
) [static]

Expand compressed pointers in the array mp into a full set of indices in the array mj.

Parameters:
ncolnumber of columns (or rows)
mpcolumn pointer vector of length ncol + 1
mjvector of length mp[ncol] to hold the result
Returns:
mj

Definition at line 203 of file Mutils.h.

Referenced by compressed_non_0_ij(), compressed_to_TMatrix(), Matrix_expand_pointers(), tCMatrix_validate(), and tRMatrix_validate().

Here is the caller graph for this function:

FULL_TO_PACKED ( double  )
FULL_TO_PACKED ( int  )
double get_double_by_name ( SEXP  obj,
char *  nm 
)

Definition at line 47 of file Mutils.c.

References _.

SEXP get_factors ( SEXP  obj,
char *  nm 
)

Definition at line 109 of file Mutils.c.

References _, and Matrix_factorSym.

Referenced by dgCMatrix_LU(), dgCMatrix_matrix_solve(), dgeMatrix_LU_(), dpoMatrix_chol(), dppMatrix_chol(), dspMatrix_trf(), and dsyMatrix_trf().

Here is the caller graph for this function:

void l_packed_getDiag ( int *  dest,
SEXP  x,
int  n 
)

Definition at line 380 of file Mutils.c.

References END_packed_getDiag, and Matrix_xSym.

Referenced by ltpMatrix_getDiag(), and tr_l_packed_getDiag().

Here is the caller graph for this function:

SEXP m_encodeInd ( SEXP  ij,
SEXP  di,
SEXP  chk_bnds 
)

Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.

Parameters:
ij,:2-column integer matrix
di,:dim(.), i.e. length 2 integer vector
chk_bnds,:logical indicating 0 <= ij[,k] < di[k] need to be checked.
Returns:
encoded index; integer if prod(dim) is small; double otherwise

Definition at line 738 of file Mutils.c.

References _, and do_ii_FILL.

SEXP m_encodeInd2 ( SEXP  i,
SEXP  j,
SEXP  di,
SEXP  chk_bnds 
)

Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.

Parameters:
i,:integer vector
j,:integer vector of same length as 'i'
di,:dim(.), i.e. length 2 integer vector
chk_bnds,:logical indicating 0 <= ij[,k] < di[k] need to be checked.
Returns:
encoded index; integer if prod(dim) is small; double otherwise

Definition at line 796 of file Mutils.c.

References _, and do_ii_FILL.

void make_d_matrix_symmetric ( double *  to,
SEXP  from 
)

Referenced by dsyMatrix_as_matrix().

Here is the caller graph for this function:

void make_d_matrix_triangular ( double *  x,
SEXP  from 
)

Referenced by dtrMatrix_as_matrix(), dtrMatrix_dtrMatrix_mm(), and LU_expand().

Here is the caller graph for this function:

void make_i_matrix_symmetric ( int *  to,
SEXP  from 
)

Referenced by dup_mMatrix_as_geMatrix(), and lsyMatrix_as_lgeMatrix().

Here is the caller graph for this function:

void make_i_matrix_triangular ( int *  x,
SEXP  from 
)

Referenced by dup_mMatrix_as_geMatrix(), and ltrMatrix_as_lgeMatrix().

Here is the caller graph for this function:

static R_INLINE int Matrix_check_class ( char *  class,
const char **  valid 
) [static]

Return the 0-based index of a string match in a vector of strings terminated by an empty string.

Returns -1 for no match.

Parameters:
classstring to match
validvector of possible matches terminated by an empty string
Returns:
index of match or -1 for no match

Definition at line 297 of file Mutils.h.

Referenced by Matrix_cs_to_SEXP().

Here is the caller graph for this function:

int Matrix_check_class_etc ( SEXP  x,
const char **  valid 
)

These are the ones users should use -- is() versions, also looking at super classes:

These are the ones users should use -- is() versions, also looking at super classes:

Returns -1 for no match. Strives to find the correct environment() for is().

Parameters:
xan R object, about which we want is(x, .) information.
validvector of possible matches terminated by an empty string.
Returns:
index of match or -1 for no match

Definition at line 889 of file Mutils.c.

References _, and Matrix_check_class_and_super.

Referenced by as_cholmod_factor(), as_cholmod_sparse(), as_cholmod_triplet(), compressed_to_TMatrix(), Csparse_subassign(), dup_mMatrix_as_dgeMatrix(), dup_mMatrix_as_geMatrix(), Matrix_as_cs(), R_init_Matrix(), R_to_CMatrix(), and Tsparse_diagU2N().

Here is the caller graph for this function:

SEXP Matrix_expand_pointers ( SEXP  pP)

Definition at line 421 of file Mutils.c.

References expand_cmprPt().

Here is the call graph for this function:

SEXP Matrix_getElement ( SEXP  list,
char *  nm 
)

Return the element of a given name from a named list.

Parameters:
list
nmname of desired element
Returns:
element of list with name nm

Definition at line 442 of file Mutils.c.

static R_INLINE SEXP mMatrix_as_dgeMatrix ( SEXP  A) [static]

Definition at line 249 of file Mutils.h.

References class_P, and dup_mMatrix_as_dgeMatrix().

Referenced by Csparse_dense_crossprod(), Csparse_dense_prod(), dgeMatrix_matrix_mm(), and dsCMatrix_matrix_solve().

Here is the call graph for this function:

Here is the caller graph for this function:

static R_INLINE SEXP mMatrix_as_geMatrix ( SEXP  A) [static]

Definition at line 255 of file Mutils.h.

References class_P, and dup_mMatrix_as_geMatrix().

Referenced by dense_to_Csparse().

Here is the call graph for this function:

Here is the caller graph for this function:

SEXP new_dgeMatrix ( int  nrow,
int  ncol 
)

Definition at line 714 of file Mutils.c.

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

Here is the call graph for this function:

static R_INLINE int packed_ncol ( int  len) [static]

Check for valid length of a packed triangular array and return the corresponding number of columns.

Parameters:
lenlength of a packed triangular array
Returns:
number of columns

Definition at line 155 of file Mutils.h.

References _.

PACKED_TO_FULL ( int  )
PACKED_TO_FULL ( double  )
SEXP set_double_by_name ( SEXP  obj,
double  val,
char *  nm 
)

Definition at line 63 of file Mutils.c.

References _.

SEXP set_factors ( SEXP  obj,
SEXP  val,
char *  nm 
)

Definition at line 129 of file Mutils.c.

References _, and Matrix_factorSym.

Referenced by dgeMatrix_LU_(), dpoMatrix_chol(), dppMatrix_chol(), dspMatrix_trf(), dsyMatrix_trf(), install_lu(), and internal_chm_factor().

Here is the caller graph for this function:

SEXP symmetricMatrix_validate ( SEXP  obj)

Definition at line 3 of file dsyMatrix.c.

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

Referenced by dspMatrix_validate().

Here is the call graph for this function:

Here is the caller graph for this function:

void tr_d_packed_getDiag ( double *  dest,
SEXP  x 
)

Definition at line 389 of file Mutils.c.

References d_packed_getDiag(), diag_P, and Matrix_DimSym.

Here is the call graph for this function:

void tr_l_packed_getDiag ( int *  dest,
SEXP  x 
)

Definition at line 405 of file Mutils.c.

References diag_P, l_packed_getDiag(), and Matrix_DimSym.

Here is the call graph for this function:

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: