|
ATSuite C++
v1.0
Scientific C++ routines originally developed by Alexis Tantet
|
Get spectrum of sparse matrices using ARPACK++. More...
#include <cstdlib>#include <cstdio>#include <vector>#include <Eigen/Sparse>#include <arpack++/arlnsmat.h>#include <arpack++/arlssym.h>#include <ATSuite/atio.hpp>Go to the source code of this file.
Classes | |
| class | configAR |
| Utility class used to give configuration options to ARPACK++. More... | |
Typedefs | |
| typedef SparseMatrix< double, RowMajor > | SpMatCSR |
| Eigen sparse CSR matrix of double type. | |
| typedef SparseMatrix< double, ColMajor > | SpMatCSC |
| Eigen sparse CSC matrix of double type. | |
Functions | |
| ARluNonSymMatrix< double, double > * | pajek2AR (FILE *fp) |
| Scans an ARPACK++ nonsymmetric matrix from a Pajek file. More... | |
| ARluNonSymMatrix< double, double > * | Eigen2AR (SpMatCSC *TEigen) |
| Converts an Eigen CSC matrix to an ARPACK++ nonsymmetric CSC matrix. More... | |
| ARluNonSymMatrix< double, double > * | Eigen2AR (SpMatCSR *TEigenCSR) |
| Converts an Eigen CSR matrix to an ARPACK++ nonsymmetric CSC matrix. More... | |
| ARluSymMatrix< double > * | Eigen2ARSym (SpMatCSC *TEigen) |
| Converts an Eigen CSC matrix to an ARPACK++ symmetric CSC matrix. More... | |
| ARluSymMatrix< double > * | Eigen2ARSym (SpMatCSR *TEigenCSR) |
| Converts an Eigen CSR matrix to an ARPACK++ symmetric CSC matrix. More... | |
| ARluNonSymMatrix< double, double > * | Compressed2AR (FILE *fp) |
| Scans an ARPACK++ nonsymmetric matrix from a file in compressed format. More... | |
| int | getSpectrum (ARluNonSymMatrix< double, double > *P, int nev, configAR cfgAR, double *EigValReal, double *EigValImag, double *EigVec) |
| Get spectrum of a nonsymmetric matrix using ARPACK++. More... | |
| void | writeSpectrum (FILE *fEigVal, FILE *fEigVec, double *EigValReal, double *EigValImag, double *EigVec, int nev, size_t N) |
| Write complex eigenvalues and eigenvectors from ARPACK++. More... | |
ATSuite functions to get spectrum of sparse matrices using ARPACK++. Also includes reading and conversion routines to ARPACK++ CSC matrices.
Definition in file atspectrum.hpp.
| ARluNonSymMatrix< double, double > * Compressed2AR | ( | FILE * | fp | ) |
Scans an ARPACK++ LU nonsymmetric CSC matrix (see ARPACK++ documentation) from a matrix file in compressed format (see atio.hpp documentation).
| [in] | fp | Descriptor of the file to which to scan. |
Definition at line 129 of file atspectrum.hpp.
| ARluNonSymMatrix< double, double > * Eigen2AR | ( | SpMatCSC * | TEigen | ) |
Converts an Eigen CSC matrix to ARPACK++ LU nonsymmetric CSC matrix.
| [in] | TEigen | Eigen matrix from which to convert. |
Definition at line 168 of file atspectrum.hpp.
Referenced by Eigen2AR().
| ARluNonSymMatrix< double, double > * Eigen2AR | ( | SpMatCSR * | TEigenCSR | ) |
Converts an Eigen CSR matrix to an ARPACK++ LU nonsymmetric CSC matrix.
| [in] | TEigenCSR | Eigen matrix from which to convert. |
Definition at line 203 of file atspectrum.hpp.
References CSR2CSC(), and Eigen2AR().
| ARluSymMatrix< double > * Eigen2ARSym | ( | SpMatCSC * | TEigen | ) |
Converts an Eigen CSC matrix to ARPACK++ LU symmetric matrix.
| [in] | TEigen | Eigen matrix from which to convert. |
Definition at line 224 of file atspectrum.hpp.
Referenced by Eigen2ARSym().
| ARluSymMatrix< double > * Eigen2ARSym | ( | SpMatCSR * | TEigenCSR | ) |
Converts an Eigen CSR matrix to ARPACK++ LU symmetric matrix.
| [in] | TEigenCSR | Eigen matrix from which to convert. |
Definition at line 287 of file atspectrum.hpp.
References CSR2CSC(), and Eigen2ARSym().
| int getSpectrum | ( | ARluNonSymMatrix< double, double > * | P, |
| int | nev, | ||
| configAR | cfgAR, | ||
| double * | EigValReal, | ||
| double * | EigValImag, | ||
| double * | EigVec | ||
| ) |
Get spectrum of a nonsymmetric matrix using ARPACK++.
| [in] | P | ARPACK++ CSC sparse matrix from which to calculate the spectrum. |
| [in] | nev | Number of eigenvalues and eigenvectors to find. |
| [in] | cfgAR | Configuration options passed as a configAR object. |
| [out] | EigValReal | Real part of found eigenvalues. |
| [out] | EigValImag | Imaginary part of found eigenvalues. |
| [out] | EigVec | Found eigenvectors. |
Definition at line 314 of file atspectrum.hpp.
References configAR::AutoShift_, configAR::maxit_, configAR::ncv_, configAR::resid_, configAR::tol_, and configAR::which_.
| ARluNonSymMatrix< double, double > * pajek2AR | ( | FILE * | fp | ) |
Scans an ARPACK++ LU nonsymmetric CSC matrix (see ARPACK++ documentation) from a Pajek file (see Pajek documentation).
| [in] | fp | Descriptor of the file to which to scan. |
Definition at line 79 of file atspectrum.hpp.
| void writeSpectrum | ( | FILE * | fEigVal, |
| FILE * | fEigVec, | ||
| double * | EigValReal, | ||
| double * | EigValImag, | ||
| double * | EigVec, | ||
| int | nev, | ||
| size_t | N | ||
| ) |
Write complex eigenvalues and eigenvectors obtained as arrays from ARPACK++.
| [in] | fEigVal | File descriptor for eigenvalues. |
| [in] | fEigVec | File descriptor for eigenvectors. |
| [in] | EigValReal | Array of eigenvalues real parts. |
| [in] | EigValImag | Array of eigenvalues imaginary parts. |
| [in] | EigVec | Array of eigenvectors. |
| [in] | nev | Number of eigenvalues and eigenvectors. |
| [in] | N | Length of the eigenvectors. |
Definition at line 344 of file atspectrum.hpp.
1.8.12