Matrix r4655
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
cs-etc.h File Reference
#include <Rinternals.h>
#include "SuiteSparse/CXSparse/Include/cs.h"

Go to the source code of this file.

Data Structures

struct  Matrix_cs_sparse
 
struct  Matrix_cs_symbolic
 
struct  Matrix_cs_numeric
 
struct  Matrix_cs_dmperm_results
 

Macros

#define MCS_PATTERN   0
 
#define MCS_REAL   1
 
#define MCS_COMPLEX   2
 
#define MCS_XTYPE_GET()   Matrix_cs_xtype
 
#define MCS_XTYPE_SET(_VALUE_)   Matrix_cs_xtype = _VALUE_
 

Typedefs

typedef struct Matrix_cs_sparse Matrix_cs
 
typedef struct Matrix_cs_symbolic Matrix_css
 
typedef struct Matrix_cs_numeric Matrix_csn
 
typedef struct Matrix_cs_dmperm_results Matrix_csd
 

Functions

Matrix_csM2CXS (SEXP, int)
 
SEXP CXS2M (Matrix_cs *, int, char)
 
Matrix_csdMatrix_cs_dfree (Matrix_csd *)
 
Matrix_csdMatrix_cs_dmperm (const Matrix_cs *, int)
 
int Matrix_cs_dropzeros (Matrix_cs *)
 
void * Matrix_cs_free (void *)
 
int Matrix_cs_happly (const Matrix_cs *, int, double, void *)
 
int Matrix_cs_ipvec (const int *, const void *, void *, int)
 
int Matrix_cs_lsolve (const Matrix_cs *, void *)
 
Matrix_csnMatrix_cs_lu (const Matrix_cs *, const Matrix_css *, double)
 
int Matrix_cs_lusol (int, const Matrix_cs *, void *, double)
 
Matrix_csnMatrix_cs_nfree (Matrix_csn *)
 
Matrix_csMatrix_cs_permute (const Matrix_cs *, const int *, const int *, int)
 
int * Matrix_cs_pinv (const int *, int)
 
int Matrix_cs_pvec (const int *, const void *, void *, int)
 
Matrix_csnMatrix_cs_qr (const Matrix_cs *, const Matrix_css *)
 
int Matrix_cs_qrsol (int, const Matrix_cs *, void *)
 
Matrix_cssMatrix_cs_sfree (Matrix_css *)
 
Matrix_csMatrix_cs_spalloc (int, int, int, int, int)
 
Matrix_csMatrix_cs_speye (int, int, int, int)
 
Matrix_csMatrix_cs_spfree (Matrix_cs *)
 
int Matrix_cs_sprealloc (Matrix_cs *, int)
 
int Matrix_cs_spsolve (Matrix_cs *, const Matrix_cs *, int, int *, void *, const int *, int)
 
Matrix_cssMatrix_cs_sqr (int, const Matrix_cs *, int)
 
Matrix_csMatrix_cs_transpose (const Matrix_cs *, int)
 
int Matrix_cs_usolve (const Matrix_cs *, void *)
 

Variables

int Matrix_cs_xtype
 

Macro Definition Documentation

◆ MCS_COMPLEX

#define MCS_COMPLEX   2

Definition at line 9 of file cs-etc.h.

◆ MCS_PATTERN

#define MCS_PATTERN   0

Definition at line 7 of file cs-etc.h.

◆ MCS_REAL

#define MCS_REAL   1

Definition at line 8 of file cs-etc.h.

◆ MCS_XTYPE_GET

#define MCS_XTYPE_GET ( )    Matrix_cs_xtype

Definition at line 11 of file cs-etc.h.

◆ MCS_XTYPE_SET

#define MCS_XTYPE_SET (   _VALUE_)    Matrix_cs_xtype = _VALUE_

Definition at line 12 of file cs-etc.h.

Typedef Documentation

◆ Matrix_cs

typedef struct Matrix_cs_sparse Matrix_cs

◆ Matrix_csd

◆ Matrix_csn

typedef struct Matrix_cs_numeric Matrix_csn

◆ Matrix_css

Function Documentation

◆ CXS2M()

SEXP CXS2M ( Matrix_cs A,
int  values,
char  shape 
)

◆ M2CXS()

Matrix_cs * M2CXS ( SEXP  obj,
int  values 
)

◆ Matrix_cs_dfree()

Matrix_csd * Matrix_cs_dfree ( Matrix_csd D)

Definition at line 78 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by Csparse_dmperm().

◆ Matrix_cs_dmperm()

Matrix_csd * Matrix_cs_dmperm ( const Matrix_cs A,
int  seed 
)

Definition at line 90 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by Csparse_dmperm().

◆ Matrix_cs_dropzeros()

int Matrix_cs_dropzeros ( Matrix_cs A)

Definition at line 102 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dtCMatrix_solve(), and sparseLU_solve().

◆ Matrix_cs_free()

void * Matrix_cs_free ( void *  p)

Definition at line 114 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_orf(), dgCMatrix_trf(), and sparseLU_solve().

◆ Matrix_cs_happly()

int Matrix_cs_happly ( const Matrix_cs V,
int  i,
double  beta,
void *  x 
)

Definition at line 126 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

◆ Matrix_cs_ipvec()

int Matrix_cs_ipvec ( const int *  p,
const void *  b,
void *  x,
int  n 
)

Definition at line 138 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

◆ Matrix_cs_lsolve()

int Matrix_cs_lsolve ( const Matrix_cs L,
void *  x 
)

Definition at line 150 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

◆ Matrix_cs_lu()

Matrix_csn * Matrix_cs_lu ( const Matrix_cs A,
const Matrix_css S,
double  tol 
)

Definition at line 162 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_trf_().

◆ Matrix_cs_lusol()

int Matrix_cs_lusol ( int  order,
const Matrix_cs A,
void *  b,
double  tol 
)

Definition at line 174 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_lusol().

◆ Matrix_cs_nfree()

Matrix_csn * Matrix_cs_nfree ( Matrix_csn N)

Definition at line 186 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_orf(), and dgCMatrix_trf().

◆ Matrix_cs_permute()

Matrix_cs * Matrix_cs_permute ( const Matrix_cs A,
const int *  pinv,
const int *  q,
int  values 
)

Definition at line 198 of file cs-etc.c.

References MCS_COMPLEX, MCS_XTYPE_GET, and Matrix_cs_sparse::xtype.

Referenced by sparseLU_solve().

◆ Matrix_cs_pinv()

int * Matrix_cs_pinv ( const int *  p,
int  n 
)

Definition at line 223 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_orf(), dgCMatrix_trf(), and sparseLU_solve().

◆ Matrix_cs_pvec()

int Matrix_cs_pvec ( const int *  p,
const void *  b,
void *  x,
int  n 
)

Definition at line 235 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

◆ Matrix_cs_qr()

Matrix_csn * Matrix_cs_qr ( const Matrix_cs A,
const Matrix_css S 
)

Definition at line 247 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_orf_().

◆ Matrix_cs_qrsol()

int Matrix_cs_qrsol ( int  order,
const Matrix_cs A,
void *  b 
)

Definition at line 259 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_qrsol().

◆ Matrix_cs_sfree()

Matrix_css * Matrix_cs_sfree ( Matrix_css S)

Definition at line 271 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_orf(), and dgCMatrix_trf().

◆ Matrix_cs_spalloc()

Matrix_cs * Matrix_cs_spalloc ( int  m,
int  n,
int  nzmax,
int  values,
int  triplet 
)

Definition at line 283 of file cs-etc.c.

References MCS_COMPLEX, MCS_XTYPE_GET, and Matrix_cs_sparse::xtype.

Referenced by Matrix_cs_speye().

◆ Matrix_cs_speye()

Matrix_cs * Matrix_cs_speye ( int  m,
int  n,
int  values,
int  triplet 
)

◆ Matrix_cs_spfree()

Matrix_cs * Matrix_cs_spfree ( Matrix_cs A)

Definition at line 338 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dtCMatrix_solve(), and sparseLU_solve().

◆ Matrix_cs_sprealloc()

int Matrix_cs_sprealloc ( Matrix_cs A,
int  nzmax 
)

Definition at line 350 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

◆ Matrix_cs_spsolve()

int Matrix_cs_spsolve ( Matrix_cs L,
const Matrix_cs B,
int  k,
int *  xi,
void *  x,
const int *  pinv,
int  lo 
)

Definition at line 362 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

◆ Matrix_cs_sqr()

Matrix_css * Matrix_cs_sqr ( int  order,
const Matrix_cs A,
int  qr 
)

Definition at line 374 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Referenced by dgCMatrix_orf_(), and dgCMatrix_trf_().

◆ Matrix_cs_transpose()

Matrix_cs * Matrix_cs_transpose ( const Matrix_cs A,
int  values 
)

Definition at line 386 of file cs-etc.c.

References MCS_COMPLEX, MCS_XTYPE_GET, and Matrix_cs_sparse::xtype.

Referenced by dtCMatrix_solve(), and sparseLU_solve().

◆ Matrix_cs_usolve()

int Matrix_cs_usolve ( const Matrix_cs U,
void *  x 
)

Definition at line 411 of file cs-etc.c.

References MCS_COMPLEX, and MCS_XTYPE_GET.

Variable Documentation

◆ Matrix_cs_xtype

int Matrix_cs_xtype
extern

Definition at line 4 of file cs-etc.c.