74 #define MAX_DOUBLE std::numeric_limits<real>::max() 75 #define MIN_DOUBLE std::numeric_limits<real>::min() 78 #define PI 3.14159265 // needed for sprandsym 82 template<
typename Matrix>
83 void init_matrix(Matrix &X,
const int N,
int blockSizesMultuple = 4);
99 template<
typename Matrix>
105 std::vector<int> blockSizes(nlevels);
106 blockSizes[nlevels - 1] = 1;
107 for (
int ind = nlevels - 2; ind >= 0; ind--)
108 blockSizes[ind] = blockSizes[ind + 1] * blockSizesMultuple;
int get_matrix_from_sparse_vec(char *filename, std::vector< int > &I, std::vector< int > &J, std::vector< real > &val)
Definition: random_matrices.cc:406
int get_matrix_from_binary(char *filename, MatrixTypeInner &X)
Definition: random_matrices.cc:422
mat::SizesAndBlocks rows
Definition: test.cc:51
Functionality for writing output messages to a text file.
normalMatrix MatrixGeneral
Definition: random_matrices.h:70
mat::SizesAndBlocks cols
Definition: test.cc:52
intervalType IntervalType
Definition: random_matrices.h:67
Wrapper routines for different parts of the integral code, including conversion of matrices from/to t...
triangMatrix TriangMatrixType
Definition: random_matrices.h:69
std::vector< int > VectorTypeInt
Definition: random_matrices.h:72
void sprandsym(int N, MatrixTypeInner &X, MatrixGeneral &Q, vector< ergo_real > &D, const double MATRIX_SPARSITY)
Definition: random_matrices.cc:114
File containing declaration of functions for reading/writing dense matrices and vectors.
Utilities related to the hierarchical matrix library (HML), including functions for setting up permut...
Class used to keep track of the block sizes used at different levels in the hierarchical matrix data ...
MatrixSymmetric< real, matri > symmMatrix
Definition: test_LanczosSeveralLargestEig.cc:69
Describes dimensions of matrix and its blocks on all levels.
Definition: SizesAndBlocks.h:45
int get_matrix_from_full(char *filename, MatrixTypeInner &X)
Definition: random_matrices.cc:465
File containing declarations of functions for reading/writing sparse matrices from/to mtx (MatrixMark...
void get_all_eigenvalues_of_matrix(std::vector< ergo_real > &eigvalList, const MatrixTypeInner &M)
Definition: random_matrices.cc:90
MatrixGeneral< real, matri > normalMatrix
Definition: test_LanczosSeveralLargestEig.cc:71
Definition of the main floating-point datatype used; the ergo_real type.
MatrixTriangular< real, matri > triangMatrix
Definition: test_LanczosSeveralLargestEig.cc:70
The heart of the matrix library.
void init_matrix(Matrix &X, const int N, int blockSizesMultuple=4)
Create hierarchical matrix structure.
Definition: random_matrices.h:100
Copyright(c) Emanuel Rubensson 2006.
Header file with typedefs for matrix and vector types.
int get_matrix_from_binary_vec(char *filename, std::vector< int > &I, std::vector< int > &J, std::vector< real > &val, int &N)
Definition: random_matrices.cc:441
void get_random_matrix(int N, MatrixTypeInner &X)
Definition: random_matrices.cc:59
symmMatrix MatrixTypeInner
Definition: random_matrices.h:68
void print_matrix(std::vector< ergo_real > const &A)
Definition: random_matrices.cc:46
int get_matrix_from_sparse(char *filename, MatrixTypeInner &X)
Definition: random_matrices.cc:390