mglib

Personal IDL library for M. Galloy

Directory: analysis/

Routines for handling various types of basic analysis: mathematical functions, expression evaluation, simple number theory algorithms, random numbers, sorting, etc.

Contents

.pro files

mg_acosh.pro

Inverse hyperbolic cosine.

mg_alogm.pro

Natural logarithm of a matrix.

mg_arclength.pro

Computes the arc length of a path.

mg_asinh.pro

Inverse hyperbolic sine.

mg_atanh.pro

Inverse hyperbolic tangent.

mg_choose.pro

Calculate a mathematical combination.

mg_equal.pro

Determines whether two values are equal, or within a given tolerance.

mg_evalexpr.pro

Evaluates a mathematical expression using the basic arithmetic operators +, -, *, /, and ^ along with parentheses for grouping and simple function calls of a single variable.

mg_expm.pro

Exponential of a matrix.

mg_factor.pro

Returns the prime factorization of a given integer value n.

mg_find_pattern.pro

Finds a 1-dimensional pattern in an array.

mg_flatten.pro

Create a 1-dimensional array from a multi-dimensional input.

mg_gcd.pro

Find the greatest common denominator (GCD) for two positive integers.

mg_gradient.pro

Compute the gradient of an array.

mg_hist_nd.pro

Find the histogram of a set of n-dimensional points.

mg_in.pro

Returns whether an element in contained in an array.

mg_lcm.pro

Find the least common multiple (LCM) for two positive integers.

mg_linear_function.pro

Create a function which maps in_range to out_range with a linear function and returns the coefficients.

mg_local_moment.pro

Computes the local moments for an array with a given window size.

mg_n_smallest.pro

Finds the n smallest elements of a data array.

mg_permutation.pro

Calculate a mathematical permutation.

mg_power2.pro

Finds the next power of 2.

mg_radon.pro

Pure IDL implementation of the RADON routine.

mg_range.pro

Convenience function to compute the minimum and maximm value of an array.

mg_repeat.pro

Repeats a vector nreps times.

mg_repmat.pro

Create an ncolumns by nrows tiling of arr.

mg_round.pro

Rounds value to integer value (or to nearest float value).

mg_sample.pro

Get nIndices random indices for an array of size nValues (without repeating an index).

mg_sign.pro

Return the sign of the values of an array: -1 for negative values, 0 for 0 values, 1 for positive values.

mg_sort.pro

An alternative to IDL's SORT function that employs a radix-sort algorithm.

mg_triangular.pro

Returns the upper or lower triangular elements of a 2-dimensional array.

mg_trunc.pro

Truncate argument towards 0.0, i.e., takes the FLOOR of positive values and the CEIL of negative values.

mganrandom__define.pro

Pull random data from random.org.

Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.