41#ifndef HEADER_RANDOM_MATRICES
42#define HEADER_RANDOM_MATRICES
78#ifdef PRECISION_QUAD_FLT128
79#define MAX_DOUBLE FLT128_MAX
80#define MIN_DOUBLE FLT128_MIN
82#define MAX_DOUBLE std::numeric_limits<ergo_real>::max()
83#define MIN_DOUBLE std::numeric_limits<ergo_real>::min()
92template<
typename Matrix>
93void init_matrix(Matrix &X,
const int N,
int blockSizesMultuple = 4);
110template<
typename Matrix>
116 std::vector<int> blockSizes(nlevels);
117 blockSizes[nlevels - 1] = 1;
118 for (
int ind = nlevels - 2; ind >= 0; ind--)
119 blockSizes[ind] = blockSizes[ind + 1] * blockSizesMultuple;
The heart of the matrix library.
Class used to keep track of the block sizes used at different levels in the hierarchical matrix data ...
Copyright(c) Emanuel Rubensson 2006.
Describes dimensions of matrix and its blocks on all levels.
Definition SizesAndBlocks.h:45
mat::SizesAndBlocks rows
Definition test.cc:51
mat::SizesAndBlocks cols
Definition test.cc:52
File containing declaration of functions for reading/writing dense matrices and vectors.
File containing declarations of functions for reading/writing sparse matrices from/to mtx (MatrixMark...
Wrapper routines for different parts of the integral code, including conversion of matrices from/to t...
Header file with typedefs for matrix and vector types.
Utilities related to the hierarchical matrix library (HML), including functions for setting up permut...
Functionality for writing output messages to a text file.
void sprandsym(int N, MatrixTypeInner &X, MatrixGeneral &Q, vector< ergo_real > &D, const double MATRIX_SPARSITY)
Definition random_matrices.cc:129
symmMatrix MatrixTypeInner
Definition random_matrices.h:72
intervalType IntervalType
Definition random_matrices.h:71
void get_random_symm_matrix(int N, MatrixTypeInner &X, int blockSizesMultuple=4)
Definition random_matrices.cc:65
int get_matrix_from_sparse_vec(char *filename, std::vector< int > &I, std::vector< int > &J, std::vector< ergo_real > &val)
Definition random_matrices.cc:421
std::vector< int > VectorTypeInt
Definition random_matrices.h:76
int get_matrix_from_full(char *filename, MatrixTypeInner &X)
Definition random_matrices.cc:480
void print_matrix(std::vector< ergo_real > const &A)
Definition random_matrices.cc:52
void init_matrix(Matrix &X, const int N, int blockSizesMultuple=4)
Create hierarchical matrix structure.
Definition random_matrices.h:111
void print_ergo_matrix(const MatrixTypeInner &F)
Definition random_matrices.cc:45
int get_matrix_from_binary(char *filename, MatrixTypeInner &X)
Definition random_matrices.cc:437
void get_all_eigenvalues_of_matrix(std::vector< ergo_real > &eigvalList, const MatrixTypeInner &M)
Definition random_matrices.cc:105
triangMatrix TriangMatrixType
Definition random_matrices.h:73
int get_matrix_from_sparse(char *filename, MatrixTypeInner &X)
Definition random_matrices.cc:405
normalMatrix MatrixGeneral
Definition random_matrices.h:74
void get_random_sparse_blocks_matrix(int N, MatrixTypeInner &X, int blockSizesMultuple=4, ergo_real probabilityBeingZero=0)
Definition random_matrices.cc:95
int get_matrix_from_binary_vec(char *filename, std::vector< int > &I, std::vector< int > &J, std::vector< ergo_real > &val, int &N)
Definition random_matrices.cc:456
Definition of the main floating-point datatype used; the ergo_real type.
double ergo_real
Definition realtype.h:69
MatrixSymmetric< real, matri > symmMatrix
Definition test_LanczosSeveralLargestEig.cc:69
MatrixTriangular< real, matri > triangMatrix
Definition test_LanczosSeveralLargestEig.cc:70
MatrixGeneral< real, matri > normalMatrix
Definition test_LanczosSeveralLargestEig.cc:71