Matrix r5059
Loading...
Searching...
No Matches
isTriangular.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 CURL(t)
 
#define CLRU(t)
 

Functions

int dense_is_diagonal (SEXP, const char *)
 
int sparse_is_diagonal (SEXP, const char *)
 
int dense_is_triangular (SEXP obj, const char *class, char op_ul)
 
int sparse_is_triangular (SEXP obj, const char *class, char op_ul)
 
SEXP R_dense_is_triangular (SEXP s_obj, SEXP s_upper)
 
SEXP R_sparse_is_triangular (SEXP s_obj, SEXP s_upper)
 

Macro Definition Documentation

◆ CLRU

#define CLRU ( t)
Value:
do { \
for (j = 0, k = 0; j < n; ++j) { \
kend = pp[j]; \
if (k < kend && pi[k] < j) \
break; \
k = kend; \
} \
if (j == n) \
return t; \
} while (0)

Referenced by sparse_is_triangular().

◆ CURL

#define CURL ( t)
Value:
do { \
for (j = 0, k = 0; j < n; ++j) { \
kend = pp[j]; \
if (k < kend && pi[kend - 1] > j) \
break; \
k = kend; \
} \
if (j == n) \
return t; \
} while (0)

Referenced by sparse_is_triangular().

◆ TEMPLATE

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px = c##PTR(x); \
if ((op_ul == '\0' || op_ul == 'U') && \
!c##NAME(test2)(px, (size_t) n, 'U', '\0', 'N')) \
return 1; \
if ((op_ul == '\0' || op_ul != 'U') && \
!c##NAME(test2)(px, (size_t) n, 'L', '\0', 'N')) \
return -1; \
} while (0)
cholmod_common c
Definition cholmod-etc.c:5

Referenced by dense_is_triangular().

Function Documentation

◆ dense_is_diagonal()

int dense_is_diagonal ( SEXP obj,
const char * class )

Definition at line 7 of file isDiagonal.c.

References DIM, GET_SLOT, Matrix_xSym, SWITCH4, TEMPLATE, and UPLO.

Referenced by dense_is_triangular(), and R_dense_is_diagonal().

◆ dense_is_triangular()

int dense_is_triangular ( SEXP obj,
const char * class,
char op_ul )

Definition at line 11 of file isTriangular.c.

References dense_is_diagonal(), DIM, GET_SLOT, Matrix_xSym, SWITCH4, TEMPLATE, and UPLO.

Referenced by R_dense_is_triangular().

◆ R_dense_is_triangular()

SEXP R_dense_is_triangular ( SEXP s_obj,
SEXP s_upper )

◆ R_sparse_is_triangular()

SEXP R_sparse_is_triangular ( SEXP s_obj,
SEXP s_upper )

◆ sparse_is_diagonal()

int sparse_is_diagonal ( SEXP obj,
const char * class )

Definition at line 45 of file isDiagonal.c.

References DIM, GET_SLOT, Matrix_iSym, Matrix_jSym, and Matrix_pSym.

Referenced by R_sparse_is_diagonal(), and sparse_is_triangular().

◆ sparse_is_triangular()

int sparse_is_triangular ( SEXP obj,
const char * class,
char op_ul )

Definition at line 60 of file isTriangular.c.

References CLRU, CURL, DIM, GET_SLOT, Matrix_iSym, Matrix_jSym, Matrix_pSym, sparse_is_diagonal(), and UPLO.

Referenced by R_sparse_is_triangular().