ocean.math

Modules

Bessel
module ocean.math.Bessel

Cylindrical Bessel functions of integral order.

BinaryHistogram
module ocean.math.BinaryHistogram

An integer, binary logarithmic statistics counter

Bracket
module ocean.math.Bracket

Algorithms for finding roots and extrema of one-argument real functions using bracketing.

Convert
module ocean.math.Convert

Module contains utility functions to convert floats to integer types. Old conversion functions eg. ocean.math.Math.rndint or ocean.math.Math.rndlong currently round x.5 to the nearest even integer. So rndint(4.5) == 4 and rndint(5.5) == 6. This is undesired behaviour for some situations, so the functions in this module round to the nearest integer. So floatToInt(4.5, output) sets output == 5 and floatToInt(5.5, output) sets output == 6 (this is round to nearest integer away from zero rounding see http://man7.org/linux/man-pages/man3/lround.3.html for details on the stdc lround, lroundf, llround, and llroundf functions).

Distribution
module ocean.math.Distribution

Helper class useful for producing apache bench style output about value distributions. For example:

Elliptic
module ocean.math.Elliptic
ErrorFunction
module ocean.math.ErrorFunction
GammaFunction
module ocean.math.GammaFunction

Implementation of the gamma and beta functions, and their integrals.

IEEE
module ocean.math.IEEE
IncrementalAverage
module ocean.math.IncrementalAverage

Calculates the average using an accumulative technique (i.e, not all the values are provided at once). The struct doesn't store any previous values.

IrregularMovingAverage
module ocean.math.IrregularMovingAverage

Struct implementation of a moving average designed to handle irregularly spaced data. In principle this can also be used as a serializable record struct.

Math
module ocean.math.Math
Probability
module ocean.math.Probability
Range
module ocean.math.Range

Simple integer range struct with various comparison functions.

SlidingAverage
module ocean.math.SlidingAverage

Sliding Average Module

TimeHistogram
module ocean.math.TimeHistogram

A timing statistics counter for any sort of transaction that takes a microsecond to a second to complete. Collects the following statistical information: - a logarithmic time histogram with bins from ≥1µs to <1s, three bins per power of ten in a stepping of 1 .. 2 .. 5 .., plus one bin for each <1µs and ≥1s, - the total number of transactions and the aggregated total completion time.

WideUInt
module ocean.math.WideUInt

Struct emulating a large (bigger than ulong) non-negative integer of fixed range (defined via template argument). ulong but still fixed in size (defined via template argument).

random
module ocean.math.random