A collection of planar geometry functions
Math::Geometry::Voronoi computes Voronoi diagrams from a set of
input points.
This module calculates the intersection point of two straight lines (if
one exists). It returns 0, if no intersection point exists. If the lines
have an intersection point, the coordinates of the point are the
returnvalue. If the given lines have infinite intersection points, -1 is
returned.
Math::Polygon::Tree creates a B-tree of polygon parts for fast check
if object is inside this polygon. This method is effective if polygon
has hundreds or more segments.
This package supplies a set of functions that find the roots of
polynomials. Polynomials up to the quartic may be solved directly by
numerical formulae. Polynomials of fifth and higher powers will be
solved by an iterative method, as there are no general solutions for
fifth and higher powers.
The linear, quadratic, cubic, and quartic *_roots() functions all
expect to have a non-zero value for the $a term.
If the constant term is zero then the first value returned in the list
of answers will always be zero, for all functions.
Math::Prime::XS detects and calculates prime numbers by either applying Modulo
operator division, the Sieve of Eratosthenes, a Summation calculation or Trial
division.
As with other Pseudo-Random Number Generator (PRNG) algorithms like the
Mersenne Twister (see Math::Random::MT), this algorithm is designed to
take some seed information and produce seemingly random results as output.
However, ISAAC (Indirection, Shift, Accumulate, Add, and Count) has
different goals than these commonly used algorithms. In particular, it's
really fast - on average, it requires only 18.75 machine cycles to generate
a 32-bit value. This makes it suitable for applications where a significant
amount of random data needs to be produced quickly, such solving using the
Monte Carlo method or for games.
As with other Pseudo-Random Number Generator (PRNG) algorithms like the
Mersenne Twister (see Math::Random::MT), this algorithm is designed to
take some seed information and produce seemingly random results as output.
However, ISAAC (Indirection, Shift, Accumulate, Add, and Count) has
different goals than these commonly used algorithms. In particular, it's
really fast - on average, it requires only 18.75 machine cycles to generate
a 32-bit value. This makes it suitable for applications where a significant
amount of random data needs to be produced quickly, such solving using the
Monte Carlo method or for games.
The Mersenne Twister is a fast pseudorandom number generator (PRNG)
that is capable of providing large volumes (> 10^6004) of "high
quality" pseudorandom data to applications that may exhaust available
"truly" random data sources or system-provided PRNGs such as rand.
This module provides PRNGs that are based on the Mersenne Twister.
There is a functional interface to a single, standalone PRNG, and an
OO interface (based on the inside-out object model as implemented by
the Object::InsideOut module) for generating multiple PRNG objects.
The PRNGs are self-seeding, automatically acquiring a (19968-bit)
random seed from user-selectable sources.
The Mersenne Twister is a pseudorandom number generator developed by
Makoto Matsumoto and Takuji Nishimura.