Matrix r5059
Loading...
Searching...
No Matches
symmpart.c File Reference
#include "Mdefines.h"
#include "M5.h"
#include "idz.h"

Go to the source code of this file.

Macros

#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 

Functions

SEXP dense_as_kind (SEXP, const char *, char, int)
 
SEXP sparse_as_kind (SEXP, const char *, char)
 
SEXP dense_symmpart (SEXP from, const char *class, char op_ul, char op_ct)
 
SEXP sparse_symmpart (SEXP from, const char *class, char op_ul, char op_ct)
 
SEXP R_dense_symmpart (SEXP s_from, SEXP s_uplo, SEXP s_trans)
 
SEXP R_sparse_symmpart (SEXP s_from, SEXP s_uplo, SEXP s_trans)
 

Macro Definition Documentation

◆ TEMPLATE [1/7]

#define TEMPLATE ( c)

Referenced by dense_symmpart(), and sparse_symmpart().

◆ TEMPLATE [2/7]

#define TEMPLATE ( c)

◆ TEMPLATE [3/7]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px0 = c##PTR(x0), *px1 = c##PTR(x1); \
for (j = 0, k = 0; j < n; ++j) { \
kend = pp0[j]; \
while (k < kend) { \
if (pi0[k] != j) { \
c##ASSIGN_IDEN(*px1, px0[k]); \
c##MULTIPLY(*px1, 0.5); \
} \
else if (op_ct == 'C') \
c##ASSIGN_PROJ_REAL(*px1, px0[k]); \
else \
c##ASSIGN_IDEN(*px1, px0[k]); \
++k; ++px1; \
} \
} \
} while (0)
cholmod_common c
Definition cholmod-etc.c:5

◆ TEMPLATE [4/7]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px0 = c##PTR(x0), *px1 = c##PTR(x1); \
for (j = 0, k = 0; j < n; ++j) { \
kend = pp0[j]; \
if (!up) { \
*pi1 = j; \
*px1 = c##UNIT; \
++pi1; ++px1; \
} \
while (k < kend) { \
*pi1 = pi0[k]; \
c##ASSIGN_IDEN(*px1, px0[k]); \
c##MULTIPLY(*px1, 0.5); \
++k; ++pi1; ++px1; \
} \
if (up) { \
*pi1 = j; \
*px1 = c##UNIT; \
++pi1; ++px1; \
} \
pp1[j] = kend + j + 1; \
} \
} while (0)

◆ TEMPLATE [5/7]

#define TEMPLATE ( c)

◆ TEMPLATE [6/7]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px0 = c##PTR(x0), *px1 = c##PTR(x1); \
for (k = 0; k < nnz0; ++k) { \
if (*pi0 != *pj0) { \
c##ASSIGN_IDEN(*px1, *px0); \
c##MULTIPLY(*px1, 0.5); \
} \
else if (op_ct == 'C') \
c##ASSIGN_PROJ_REAL(*px1, *px0); \
else \
c##ASSIGN_IDEN(*px1, *px0); \
++pi0; ++pj0; ++px0; ++px1; \
} \
} while (0)

◆ TEMPLATE [7/7]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px0 = c##PTR(x0), *px1 = c##PTR(x1); \
for (k = 0; k < nnz0; ++k) { \
*pi1 = *pi0; \
*pj1 = *pj0; \
c##ASSIGN_IDEN(*px1, *px0); \
c##MULTIPLY(*px1, 0.5); \
++pi0; ++pi1; ++pj0; ++pj1; ++px0; ++px1; \
} \
for (j = 0; j < n; ++j) { \
*pi1 = *pj1 = j; \
*px1 = c##UNIT; \
++pi1; ++pj1; ++px1; \
} \
} while (0)

Function Documentation

◆ dense_as_kind()

SEXP dense_as_kind ( SEXP from,
const char * class,
char kind,
int new )

Definition at line 2000 of file coerce.c.

Referenced by dense_symmpart(), R_dense_as_kind(), R_Matrix_as_general(), and R_Matrix_as_kind().

◆ dense_symmpart()

SEXP dense_symmpart ( SEXP from,
const char * class,
char op_ul,
char op_ct )

◆ R_dense_symmpart()

SEXP R_dense_symmpart ( SEXP s_from,
SEXP s_uplo,
SEXP s_trans )

Definition at line 661 of file symmpart.c.

References dense_symmpart(), Matrix_class(), valid_dense, VALID_TRANS, and VALID_UPLO.

◆ R_sparse_symmpart()

SEXP R_sparse_symmpart ( SEXP s_from,
SEXP s_uplo,
SEXP s_trans )

Definition at line 672 of file symmpart.c.

References Matrix_class(), sparse_symmpart(), valid_sparse, VALID_TRANS, and VALID_UPLO.

◆ sparse_as_kind()

SEXP sparse_as_kind ( SEXP from,
const char * class,
char kind )

◆ sparse_symmpart()

SEXP sparse_symmpart ( SEXP from,
const char * class,
char op_ul,
char op_ct )