Math -- Mathematics Library

The Math library contains functions providing overloaded entry points for the standard C math library and convenient ways to generate random numbers, and classes providing type-safe ways to get math constants and numerical type limits.

Header Files

Math.h
Math.h contains overloaded entry points for standard C math functions, and some convenience functions.
Constants.h
Constants.h defines a generic class Constants containing numerical limits of atomic types and mathematical constants for floating-point types.
Complex.h
Complex is a class representing complex numbers, templatized by scalar type.
Interval.h
Interval is a class representing fully closed intervals, templatized by the underlying scalar type. Interval provides constructors, comparison operators, set arithmetic on intervals, and some interval arithmetic operators.
Matrix.h
Matrix is a class representing double-valued matrices of dynamic sizes, and a general set of linear algebra operations.
Random.h
Random.h contains convenience functions to create random numbers of different distributions.
Noise.h
Noise is a class implementing Ken Perlin's improved 3D band-limited noise function, following his 2002 SIGGRAPH paper. The static Noise::noise method is templatized by scalar type. Client code can #define MATH_NOISE_NONSTANDARD_TEMPLATES to inline the noise method, for a small speed boost.
BrokenLine.h
BrokenLine is a class describing constant piecewise linear mappings from a source interval to the interval [-1, 1] using a "broken line" model with two linear ramps and a flat "dead zone" in the middle.
SimplexMinimizer.h
SimplexMinimizer is a class implementing a non-linear optimizer based on a simplex algorithm, templatized by a functor implementing the minimization target function.
VarianceAccumulator.h
VarianceAccumulator is a class to accumulate the mean and sample variance of a sequence of samples, based on D.E. Knuth's recurrence relation from "The Art of Computer Programming, Vol. 2".
Histogram.h
Histogram is a class to represent histograms of values of arbitrary scalar types.
MathMarshallers.h
MathMarshallers contains specializations of the Misc::Marshaller templatized class for objects from the Math library.
MathValueCoders.h
MathValueCoders contains specializations of the Misc::ValueCoder templatized class for objects from the Math library.