ergo
|
Header file containing declarations of functions required for testing purposes. Functions include generation of the random dense matrices, random sparse symmetric matrices, initialization of the hierarchical matrix structure, work with files and printing matrix to the screen. More...
#include "matrix_typedefs.h"
#include "realtype.h"
#include "matrix_utilities.h"
#include "integral_matrix_wrappers.h"
#include "SizesAndBlocks.h"
#include "Matrix.h"
#include "Vector.h"
#include "MatrixSymmetric.h"
#include "MatrixTriangular.h"
#include "MatrixGeneral.h"
#include "VectorGeneral.h"
#include "output.h"
#include "files_dense.h"
#include "files_sparse.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | MAX_DOUBLE std::numeric_limits<ergo_real>::max() |
#define | MIN_DOUBLE std::numeric_limits<ergo_real>::min() |
#define | PI 3.14159265 |
Typedefs | |
typedef intervalType | IntervalType |
typedef symmMatrix | MatrixTypeInner |
typedef triangMatrix | TriangMatrixType |
typedef normalMatrix | MatrixGeneral |
typedef std::vector< int > | VectorTypeInt |
Functions | |
void | print_ergo_matrix (const MatrixTypeInner &F) |
void | print_matrix (std::vector< ergo_real > const &A) |
template<typename Matrix > | |
void | init_matrix (Matrix &X, const int N, int blockSizesMultuple) |
Create hierarchical matrix structure. More... | |
void | get_random_symm_matrix (int N, MatrixTypeInner &X, int blockSizesMultuple=4) |
void | get_random_sparse_blocks_matrix (int N, MatrixTypeInner &X, int blockSizesMultuple=4, ergo_real probabilityBeingZero=0) |
void | get_all_eigenvalues_of_matrix (std::vector< ergo_real > &eigvalList, const MatrixTypeInner &M) |
void | sprandsym (int N, MatrixTypeInner &X, MatrixGeneral &Q, vector< ergo_real > &D, const double MATRIX_SPARSITY) |
int | get_matrix_from_sparse (char *filename, MatrixTypeInner &X) |
int | get_matrix_from_sparse_vec (char *filename, std::vector< int > &I, std::vector< int > &J, std::vector< ergo_real > &val) |
int | get_matrix_from_binary (char *filename, MatrixTypeInner &X) |
int | get_matrix_from_binary_vec (char *filename, std::vector< int > &I, std::vector< int > &J, std::vector< ergo_real > &val, int &N) |
int | get_matrix_from_full (char *filename, MatrixTypeInner &X) |
Header file containing declarations of functions required for testing purposes. Functions include generation of the random dense matrices, random sparse symmetric matrices, initialization of the hierarchical matrix structure, work with files and printing matrix to the screen.
#define PI 3.14159265 |
typedef intervalType IntervalType |
typedef normalMatrix MatrixGeneral |
typedef symmMatrix MatrixTypeInner |
typedef triangMatrix TriangMatrixType |
typedef std::vector<int> VectorTypeInt |
void get_all_eigenvalues_of_matrix | ( | std::vector< ergo_real > & | eigvalList, |
const MatrixTypeInner & | M | ||
) |
References A, and mat::syev().
Referenced by main().
int get_matrix_from_binary | ( | char * | filename, |
MatrixTypeInner & | X | ||
) |
References A, and mat::read_matrix().
int get_matrix_from_binary_vec | ( | char * | filename, |
std::vector< int > & | I, | ||
std::vector< int > & | J, | ||
std::vector< ergo_real > & | val, | ||
int & | N | ||
) |
References A, and mat::read_matrix().
int get_matrix_from_full | ( | char * | filename, |
MatrixTypeInner & | X | ||
) |
References A, and mat::read_matrix().
int get_matrix_from_sparse | ( | char * | filename, |
MatrixTypeInner & | X | ||
) |
References read_matrix_from_mtx().
int get_matrix_from_sparse_vec | ( | char * | filename, |
std::vector< int > & | I, | ||
std::vector< int > & | J, | ||
std::vector< ergo_real > & | val | ||
) |
References read_matrix_from_mtx().
void get_random_sparse_blocks_matrix | ( | int | N, |
MatrixTypeInner & | X, | ||
int | blockSizesMultuple = 4 , |
||
ergo_real | probabilityBeingZero = 0 |
||
) |
void get_random_symm_matrix | ( | int | N, |
MatrixTypeInner & | X, | ||
int | blockSizesMultuple = 4 |
||
) |
Referenced by main().
void init_matrix | ( | Matrix & | X, |
const int | N, | ||
int | blockSizesMultuple | ||
) |
void print_ergo_matrix | ( | const MatrixTypeInner & | F | ) |
References print_matrix().
void print_matrix | ( | std::vector< ergo_real > const & | A | ) |
References A.
Referenced by print_ergo_matrix().
void sprandsym | ( | int | N, |
MatrixTypeInner & | X, | ||
MatrixGeneral & | Q, | ||
vector< ergo_real > & | D, | ||
const double | MATRIX_SPARSITY | ||
) |
References cols, PI, rows, template_blas_cos(), and template_blas_sin().
Referenced by main().