|
ATSuite C++
v1.0
Scientific C++ routines originally developed by Alexis Tantet
|
Input, output and conversion routines. More...
#include <vector>#include <Eigen/Dense>#include <Eigen/Sparse>#include <gsl/gsl_vector.h>#include <gsl/gsl_matrix.h>Go to the source code of this file.
Typedefs | |
| typedef Eigen::SparseMatrix< double, Eigen::RowMajor > | SpMatCSR |
| Eigen sparse CSR matrix of double type. | |
| typedef Eigen::SparseMatrix< double, Eigen::ColMajor > | SpMatCSC |
| Eigen sparse CSC matrix of double type. | |
| typedef Eigen::Triplet< double > | Tri |
| Eigen triplet of double. | |
Functions | |
| void | Eigen2Pajek (FILE *fp, const SpMatCSR *P, const char *dataFormat="%lf") |
| Print an Eigen CSR matrix in Pajek format. More... | |
| void | Eigen2Compressed (FILE *fp, const SpMatCSC *P, const char *dataFormat="%lf") |
| Print an Eigen CSC matrix to file in compressed format. More... | |
| void | Eigen2Compressed (FILE *fp, const SpMatCSR *P, const char *dataFormat="%lf") |
| Print an Eigen CSR matrix to file in compressed format. More... | |
| SpMatCSC * | pajek2Eigen (FILE *fp, const char *dataFormat="%lf") |
| Scans an Eigen CSC matrix from a Pajek file. More... | |
| SpMatCSR * | Compressed2Eigen (FILE *fp, const char *dataFormat="%lf") |
| Scan an Eigen CSR matrix from a file in compressed format. More... | |
| gsl_matrix * | Compressed2EdgeList (FILE *fp, const char *dataFormat="%lf") |
| Scan an edge list from a file in compressed format. More... | |
| void | Compressed2EdgeList (FILE *src, FILE *dst, const char *dataFormat="%lf") |
| Print and edge list to a file in compressed format. More... | |
| SpMatCSR * | CSC2CSR (const SpMatCSC *T) |
| Convert an Eigen CSC matrix to an Eigen CSR matrix. More... | |
| SpMatCSC * | CSR2CSC (const SpMatCSR *T) |
| Convert an Eigen CSR matrix to an Eigen CSC matrix. More... | |
| std::vector< Tri > | Eigen2Triplet (const SpMatCSC *T) |
| Convert an Eigen CSC matrix to a vector of Eigen triplet. More... | |
| std::vector< Tri > | Eigen2Triplet (const SpMatCSR *T) |
| Convert an Eigen CSR matrix to a vector of Eigen triplet. More... | |
| void | fprintfEigen (FILE *fp, const SpMatCSR *T, const char *dataFormat) |
| Print an Eigen CSR matrix as a dense matrix. More... | |
| size_t | lineCount (FILE *fp) |
| Count the number of lines in a file. More... | |
ATSuite input, output and conversion routines between various matrices types.
Sparse matrices are printed in the following ascii compressed format:
Definition in file atio.hpp.
| gsl_matrix * Compressed2EdgeList | ( | FILE * | fp, |
| const char * | dataFormat = "%lf" |
||
| ) |
Scan an edge list as a GSL matrix from a matrix file in compressed format (see atio.hpp documentation).
| [in] | fp | Descriptor of the file to which to scan. |
| [in] | dataFormat | Format in which to scan each matrix element. |
Definition at line 263 of file atio.hpp.
Referenced by Compressed2EdgeList().
| void Compressed2EdgeList | ( | FILE * | src, |
| FILE * | dst, | ||
| const char * | dataFormat = "%lf" |
||
| ) |
Print an edge list to a matrix file in compressed format (see atio.hpp documentation).
| [in] | src | Descriptor of the file to which to scan in compressed matrix format. |
| [in] | dst | Descriptor of the file to which to print in edge list format. |
| [in] | dataFormat | Format in which to scan and print each matrix element. |
Definition at line 325 of file atio.hpp.
References Compressed2EdgeList().
| SpMatCSR * Compressed2Eigen | ( | FILE * | fp, |
| const char * | dataFormat = "%lf" |
||
| ) |
Convert an Eigen CSC matrix to an Eigen CSR matrix.
| [in] | T | Eigen matrix from which to convert. |
Definition at line 349 of file atio.hpp.
References Eigen2Triplet().
Converts an Eigen CSR matrix to an Eigen CSC matrix.
| [in] | T | Eigen matrix from which to convert. |
Definition at line 372 of file atio.hpp.
References Eigen2Triplet().
Referenced by Eigen2AR(), and Eigen2ARSym().
| void Eigen2Compressed | ( | FILE * | fp, |
| const SpMatCSC * | P, | ||
| const char * | dataFormat = "%lf" |
||
| ) |
Print an Eigen CSC matrix in compressed format (see atio.hpp documentation).
| [in] | fp | Descriptor of the file to which to print. |
| [in] | P | Eigen matrix to print. |
| [in] | dataFormat | Format in which to print each matrix element. |
Definition at line 137 of file atio.hpp.
Referenced by transferOperator::printBackwardTransition(), and transferOperator::printForwardTransition().
| void Eigen2Compressed | ( | FILE * | fp, |
| const SpMatCSR * | P, | ||
| const char * | dataFormat = "%lf" |
||
| ) |
| void Eigen2Pajek | ( | FILE * | fp, |
| const SpMatCSR * | P, | ||
| const char * | dataFormat = "%lf" |
||
| ) |
Print an Eigen CSR matrix in Pajek format (see Pajek documentation).
| [in] | fp | Descriptor of the file to which to print. |
| [in] | P | Eigen matrix to print. |
| [in] | dataFormat | Format in which to print each matrix element. |
| void fprintfEigen | ( | FILE * | fp, |
| const SpMatCSR * | T, | ||
| const char * | dataFormat | ||
| ) |
| size_t lineCount | ( | FILE * | fp | ) |
| SpMatCSC * pajek2Eigen | ( | FILE * | fp, |
| const char * | dataFormat = "%lf" |
||
| ) |
Scans an Eigen CSC matrix from a Pajek file (see Pajek documentation).
| [in] | fp | Descriptor of the file to which to scan. |
| [in] | dataFormat | Format in which to print each matrix element. |
1.8.12