Module modcholesky::utils[][src]

Expand description

Utility functions

Functions

Builds a diagonal matrix from a 1D slice

Computes the Eigenvalues of a 2x2 matrix

Returns the index of the largest element in a 1D array

Returns the index of the element with the largest absolute value in a 1D array

Returns the permutation matrix for a vector of permuted indices

Returns a random diagonal matrix with Eigenvalues inbetween eig_range_min and eig_range_max. The minimum number of negative eigenvalues can be specified with min_neg_eigenvalues. Takes a seed for random values.

Returns a random Householder matrix of dimension dim and with seed seed.

Swaps columns idx1 and idx2 of matrix mat

Swaps rows idx1 and idx2 of matrix mat