40 template <
class rand_type>
43 Rand(rand_type lo, rand_type hi) :
low(lo),
range(hi - lo) { srand(rand()); }
65 if (hi <= lo)
range = 0;
125 #endif // test_utils_h INDEX Index
The type to use for all integer numbers and indices.
void random_fill_matrix_pos_def(MatrixView A, Numeric range, bool positive)
Generate random, positive definite matrix.
void add_noise(VectorView v, Numeric range)
Add noise to vector.
A class implementing complex numbers for ARTS.
void random_fill_vector(VectorView A, Numeric range, bool positive)
Fill vector with random values.
Range random_range(Index n)
Generate random sub-range of the range [0, n-1].
MatrixView random_submatrix(MatrixView A, Index m, Index n)
Rand(rand_type lo, rand_type hi)
void random_fill_matrix_symmetric(MatrixView A, Numeric range, bool positive)
Generate random, symmetric matrix.
NUMERIC Numeric
The type to use for all floating point numbers.
void random_fill_matrix_pos_semi_def(MatrixView A, Numeric range, bool positive)
Generate random, positive semi-definite matrix.
Implementation of Matrix, Vector, and such stuff.
A constant view of a Vector.
rand_type operator()() const
A constant view of a Matrix.
rand_type low
Random Index class.
A constant view of a ComplexMatrix.
Numeric get_maximum_error(ConstMatrixView A1, ConstMatrixView A2, bool relative)
Maximum element-wise error of two matrices.
void random_fill_matrix(MatrixView A, Numeric range, bool positive)
Fill matrix with random values.
The ComplexMatrixView class.