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

Go to the source code of this file.

Macros

#define NZ(c, x)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 

Functions

SEXP sparse_dropzero (SEXP from, const char *class, double tol)
 
SEXP R_sparse_dropzero (SEXP s_from, SEXP s_tol)
 

Macro Definition Documentation

◆ NZ

#define NZ ( c,
x )
Value:
((strict) ? c##NOT_ZERO(x) : c##NOT_ZERO_TOL(x, tol))
cholmod_common c
Definition cholmod-etc.c:5

Referenced by sparse_dropzero().

◆ TEMPLATE [1/4]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px0 = c##PTR(x0); \
for (k = 0; k < nnz0; ++k) \
if (NZ(c, px0[k])) \
++nnz1; \
} while (0)
#define NZ(c, x)

Referenced by sparse_dropzero().

◆ TEMPLATE [2/4]

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

◆ TEMPLATE [3/4]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px0 = c##PTR(x0); \
for (k = 0; k < nnz0; ++k) \
if (NZ(c, px0[k])) \
++nnz1; \
} while (0)

◆ TEMPLATE [4/4]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px0 = c##PTR(x0), *px1 = c##PTR(x1); \
for (k = 0; k < nnz0; ++k) \
if (NZ(c, px0[k])) { \
*(pi1++) = pi0[k]; \
*(pj1++) = pj0[k]; \
*(px1++) = px0[k]; \
} \
} while (0)

Function Documentation

◆ R_sparse_dropzero()

SEXP R_sparse_dropzero ( SEXP s_from,
SEXP s_tol )

Definition at line 211 of file dropzero.c.

References _, Matrix_class(), sparse_dropzero(), TYPEOF, and valid_sparse.

◆ sparse_dropzero()

SEXP sparse_dropzero ( SEXP from,
const char * class,
double tol )