ScaMaC  0.8.2
A Scalable Matrix Collection
Files | Functions
ScaMaC toolkit

Toolkit functions for exploration of the ScaMaC and analysis of generated matrices. More...

Files

file  scamactools.h
 ScaMaC toolkit top-level header file
 

Functions

ScamacErrorCode scamac_cmk (const ScamacMatrix *sm, int **perm)
 return Cuthill-McKee permutation
 
ScamacErrorCode scamac_sparsemat_permute (const ScamacMatrix *sm, const int *perm, ScamacMatrix **sm_perm)
 permute sparse matrix
 
ScamacErrorCode scamac_lanczos_ev (const ScamacMatop *sm, double tol, double *ev1, double *ev2, double *eps1, double *eps2)
 Lanczos for extremal eigenvalues of sparse matrix.
 
ScamacErrorCode scamac_lanczos_ev_real (const ScamacMatop *sm, double tol, double *ev1, double *ev2, double *eps1, double *eps2)
 Lanczos for extremal eigenvalues of real (symmetric) matrix (computational routine)
 
ScamacErrorCode scamac_lanczos_ev_cplx (const ScamacMatop *sm, double tol, double *ev1, double *ev2, double *eps1, double *eps2)
 Lanczos for extremal eigenvalues of complex (hermitian) matrix (computational routine)
 
ScamacErrorCode scamac_plot_pattern (const scamac_matrix_pattern_st *pat, int downscale, const char *filename)
 write pattern to file
 
ScamacErrorCode scamac_spectrum_real_symmetric (const ScamacMatrix *sm, double **spec)
 Compute spectrum of real symmetric matrix. More...
 
ScamacErrorCode scamac_spectrum_real_general (const ScamacMatrix *sm, double **spec)
 Compute spectrum of general symmetric matrix. More...
 
ScamacErrorCode scamac_spectrum_cplx_hermitian (const ScamacMatrix *sm, double **spec)
 Compute spectrum of hermitian complex matrix. More...
 
ScamacErrorCode scamac_spectrum_cplx_general (const ScamacMatrix *sm, double **spec)
 Compute spectrum of general complex matrix. More...
 
ScamacErrorCode scamac_collect_statistics_and_pattern (const ScamacGenerator *gen, ScamacFlag flag, scamac_matrix_statistics_st *st, scamac_matrix_pattern_st **pt)
 collect matrix statistics and/or pattern from generator More...
 
ScamacErrorCode scamac_statistics_empty (scamac_matrix_statistics_st *st, ScamacIdx nrow, ScamacIdx ncol, int valtype)
 set statistics to "empty", i.e., initialize
 
ScamacErrorCode scamac_statistics_update (scamac_matrix_statistics_st *st, ScamacIdx irow, ScamacIdx nzr, const ScamacIdx *cind, const double *val)
 update statistics with data from a matrix row not yet included
 
ScamacErrorCode scamac_statistics_combine (scamac_matrix_statistics_st *stcomb, const scamac_matrix_statistics_st *st)
 combine two parts of a matrix statistics for different sets of rows
 
ScamacErrorCode scamac_statistics_print (const scamac_matrix_statistics_st *st, char **desc)
 create description of statistics for output, printing etc.
 
ScamacErrorCode scamac_pattern_alloc (int px, int py, scamac_matrix_pattern_st **pt)
 allocate memory for pattern
 
ScamacErrorCode scamac_pattern_empty (scamac_matrix_pattern_st *pt, ScamacIdx nrow, ScamacIdx ncol, int valtype)
 set pattern to "empty", i.e., initialize
 
ScamacErrorCode scamac_pattern_update (scamac_matrix_pattern_st *pt, ScamacIdx irow, ScamacIdx nzr, const ScamacIdx *cind)
 update pattern with data from a matrix row not yet included
 
ScamacErrorCode scamac_pattern_combine (scamac_matrix_pattern_st *ptcomb, const scamac_matrix_pattern_st *pt)
 combine two parts of a sparsity pattern for different sets of rows
 
ScamacErrorCode scamac_pattern_print (const scamac_matrix_pattern_st *pt, char **desc)
 create ASCII pattern for output, printing etc. More...
 
ScamacErrorCode scamac_pattern_free (scamac_matrix_pattern_st *pt)
 free memory allocated for pattern
 

Detailed Description

Toolkit functions for exploration of the ScaMaC and analysis of generated matrices.

These functions provide additional functionality for the investigation of the ScaMaC matrices. They are used in the scamact ScaMaC toolkit application.

Function Documentation

◆ scamac_collect_statistics_and_pattern()

ScamacErrorCode scamac_collect_statistics_and_pattern ( const ScamacGenerator gen,
ScamacFlag  flag,
scamac_matrix_statistics_st *  st,
scamac_matrix_pattern_st **  pt 
)

collect matrix statistics and/or pattern from generator

A matrix statistics is a small object, and no allocation of the struct is necessary. A matrix pattern is a large object, and will be allocated in this routine. It should be free'd with scamac_pattern_free() afterwards.

◆ scamac_pattern_print()

ScamacErrorCode scamac_pattern_print ( const scamac_matrix_pattern_st *  pt,
char **  desc 
)

create ASCII pattern for output, printing etc.

Note
The real plot functions are found in scamac_plot.h

◆ scamac_spectrum_cplx_general()

ScamacErrorCode scamac_spectrum_cplx_general ( const ScamacMatrix *  sm,
double **  spec 
)

Compute spectrum of general complex matrix.

Parameters
[in]smsparse matrix
[out]specpointer to array that contains the spectrum (allocated in routine)
Returns
Error code

◆ scamac_spectrum_cplx_hermitian()

ScamacErrorCode scamac_spectrum_cplx_hermitian ( const ScamacMatrix *  sm,
double **  spec 
)

Compute spectrum of hermitian complex matrix.

Parameters
[in]smsparse matrix
[out]specpointer to array that contains the spectrum (allocated in routine)
Returns
Error code

◆ scamac_spectrum_real_general()

ScamacErrorCode scamac_spectrum_real_general ( const ScamacMatrix *  sm,
double **  spec 
)

Compute spectrum of general symmetric matrix.

Parameters
[in]smsparse matrix
[out]specpointer to array that contains the spectrum (allocated in routine)
Returns
Error code

◆ scamac_spectrum_real_symmetric()

ScamacErrorCode scamac_spectrum_real_symmetric ( const ScamacMatrix *  sm,
double **  spec 
)

Compute spectrum of real symmetric matrix.

Parameters
[in]smsparse matrix
[out]specpointer to array that contains the spectrum (allocated in routine)
Returns
Error code