| SPEIGS 1.0.0

speigs.h
Go to the documentation of this file.
1
18#ifndef speigs_h
19#define speigs_h
20
21#include <stddef.h>
22
23#ifdef MATLAB_MEX_FILE
24#include "mex.h"
25 typedef mwSize spint;
26#define sperr mexErrMsgTxt
27#define id "%lld"
28#else
29#ifdef SPEIG_64
30 typedef int64_t spint;
31#define id "%lld"
32#else
33 typedef int32_t spint;
34#define id "%d"
35#endif
36#define sperr(x) printf(x);
37#endif
38
39/* Return code */
40#define SP_EIGS_OK (0)
41#define SP_EIGS_ERR (1)
42
43/* Matrix type */
44#define MATRIX_TYPE_ZERO (0)
45#define MATRIX_TYPE_SPARSE (1)
46#define MATRIX_TYPE_GENERAL (2)
47#define MATRIX_TYPE_RANKONE (3)
48#define MATRIX_TYPE_DIAG (4)
49#define MATRIX_TYPE_TWOTWO (5)
50
51#ifdef __cplusplus
52 extern "C" {
53#endif
54 extern spint speigs_analyze( spint *Ap, spint *Ai, double *Ax, spint *dim,
55 spint *iwork, spint *liwork, double *work, spint *lwork,
56 spint *type, spint *sn, double tol, double gthresh );
57
58 extern spint speigs_factorize( spint *Ap, spint *Ai, double *Ax, spint *dim, spint *aiwork,
59 double *awork, spint *type, spint *sn, spint *iwork, spint *liwork,
60 double *work, spint *lwork, double *evals, double *evecs,
61 spint *rank, double tol );
62#ifdef __cplusplus
63}
64#endif
65
66#define SPEIG_VER (1) // Version number
67
68#endif /* speigs_h */
speigs_analyze
spint speigs_analyze(spint *Ap, spint *Ai, double *Ax, spint *dim, spint *iwork, spint *liwork, double *work, spint *lwork, spint *type, spint *sn, double tol, double gthresh)
Perform the analysis phase of sparse eigen-value factorization.
Definition: speigs.c:508
speigs_factorize
spint speigs_factorize(spint *Ap, spint *Ai, double *Ax, spint *dim, spint *aiwork, double *awork, spint *type, spint *sn, spint *iwork, spint *liwork, double *work, spint *lwork, double *evals, double *evecs, spint *rank, double tol)
Perform the analysis phase of sparse eigen-value factorization.
Definition: speigs.c:644