SCM Repository

[matrix] View of /pkg/inst/include/Matrix.h
ViewVC logotype

View of /pkg/inst/include/Matrix.h

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2223 - (download) (as text) (annotate)
Fri Jul 18 23:04:48 2008 UTC (10 years, 7 months ago) by mmaechler
File size: 1461 byte(s)
build sparse_diagU2N() into functions underlying AS_CHM_*()
#ifndef MATRIX_H
#define MATRIX_H
#include <Rdefines.h>
#include <Rconfig.h>
#include "cholmod.h"

# define attribute_hidden __attribute__ ((visibility ("hidden")))
# define attribute_hidden

CHM_SP M_as_cholmod_sparse(CHM_SP ans, SEXP x);
CHM_TR M_as_cholmod_triplet(CHM_TR ans, SEXP x);
CHM_DN M_as_cholmod_dense(CHM_DN ans, SEXP x);
CHM_DN M_numeric_as_chm_dense(CHM_DN ans, double *v, int nr, int nc);
CHM_FR M_as_cholmod_factor(CHM_FR ans, SEXP x);
double M_chm_factor_ldetL2(CHM_FR f);
CHM_FR M_chm_factor_update(CHM_FR f, CHM_SP A, double mult);

#define AS_CHM_DN(x) M_as_cholmod_dense((CHM_DN)alloca(sizeof(cholmod_dense)), x )
#define AS_CHM_FR(x) M_as_cholmod_factor((CHM_FR)alloca(sizeof(cholmod_factor)), x )
/* FIXME --- "sync" with ../../src/chm_common.h -- with 3 arguments -- !!! */
#define AS_CHM_SP(x) M_as_cholmod_sparse((CHM_SP)alloca(sizeof(cholmod_sparse)), x )
#define AS_CHM_TR(x) M_as_cholmod_triplet((CHM_TR)alloca(sizeof(cholmod_triplet)), x )
#define N_AS_CHM_DN(x,nr,nc) M_numeric_as_chm_dense((CHM_DN)alloca(sizeof(cholmod_dense)), x , nr, nc )

SEXP M_Csparse_diagU2N(SEXP x);
SEXP M_chm_factor_to_SEXP(CHM_FR f, int dofree);
SEXP M_chm_sparse_to_SEXP(CHM_SP a, int dofree, int uploT, int Rkind,
			  char *diag, SEXP dn);
SEXP M_chm_triplet_to_SEXP(CHM_TR a, int dofree, int uploT, int Rkind,
			   const char* diag, SEXP dn);

SEXP M_dpoMatrix_chol(SEXP x);

#endif /* MATRIX_H */
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge