Classes implementing the Transform.Continuous
interface adapt driver values to
real-number ranges. Real numbers
are continuous: if A and B are real numbers then
0.5*(A+B) is also a real number. Digits right of the decimal point are what distinguish real numbers from
integers.
All continuous-transform names are prefixed with the word "Continuous"; the prefix was needed to distinguish
ContinuousUniform
and
ContinuousWeighted
from
DiscreteUniform
and
DiscreteWeighted
.
I thought, well the others are continuous too.
Listed alphabetically, the continuous transforms are:
ContinuousBeta
implements the beta family of distribution
curves. These curves are bounded below and above.
ContinuousCosexp
ranges over a full turn of a circle and raises an exponential base to the cosine of the angle.
This curve is bounded below by zero and above by 1 full turn (360° or 2π radians).
ContinuousFracture
divides
the driver domain into equal-sized regions and shuffles the regions randomly. Output is
bounded below by zero and above by unity. ContinuousFracture
units also
support the Driver
interface.
ContinuousGamma
implements the gamma family of distribution
curves. These curves are bounded below by zero and unbounded above. They include as special cases the
exponential distribution (motivated by
the Poisson Point Process) and the
chi-squared distribution.
ContinuousLevel
flattens out the distribution of a driver sequence while retaining the ups and downs.
Ouput is bounded below by zero and above by unity. ContinuousLevel
units also
support the Driver
interface.
ContinuousMyhill
comes
about by generalizing the waiting scenario from the Poisson Point Process
to cover a range of behaviors ranging from strict periodicity to Poisson-point unpredictability.
Output is bounded below and unbounded above.
ContinuousNormal
implements the normal distribution, familiar to
most as the "bell curve". This curve is unbounded below and unbounded above.
ContinuousProportional
implements a distribution where likelihoods progress in an 'equal-ratios' curve from an origin as of the lower range bound to a goal as of the
upper range bound.
Output is bounded below and bounded above.
ContinuousTrapezoidal
implements a distribution where likelihoods progress linearly from an origin as of the lower range bound to a goal as of the
upper range bound.
Output is bounded below and bounded above.
ContinuousUniform
is the
continous counterpart of DiscreteUniform
.
All range values are equally likely. Output is bounded below and bounded above.
ContinuousWeighted
is the
continous counterpart of DiscreteWeighted
.
The underlying distribution curve is user-specified.
Output is bounded below and bounded above.
Transform.Continuous
ranges often have lower and upper bounds, so the primary
purpose of these transforms is to rescale driver-domain values from zero to unity so that they conform to these bounds.
Some Transform.Continuous
ranges do not have an explicit upper bound; in
this circumstance the lower bound is always zero and the upper range tails away to zero.
The continuous transform for the Normal distribution is unbounded in both directions; the
distribution tails away to zero both ways.
ContinuousDistributionTransform
base class.
The abstract ContinuousDistributionTransform
class presented as Listing 1
manages an embedded ContinuousDistribution
instance.
Most, but not all, of the classes implementing the Transform.Continuous
interface subclass from ContinuousDistributionTransform
.
The ContinuousDistributionTransform
class stores its embedded
ContinuousDistribution
instance in the distribution
field. Since subclasses can potentially make no use of this class's functionality, the distribution
field
is populated upon the first getDistribution()
call. Hence methods that reference the
distribution
field must perform their own initialization checks.
The application range is divided into equal-sized intervals. For each of these intervals, the
ContinuousDistribution
instance maintains and item detailing a leftmost range value,
a rightmost range value, an origin weight (unnormalized probability), a goal weight. These two values and their corresponding weights
form a trapezoid with area 0.5×(left−right)×(origin+goal); that area is recorded along with the cumulative sum of areas up to and including
the present item. The trapezoids define the distribution, while the cumulative sums support
ContinuousDistribution.quantile()
.
Of the methods implemented in the class, convert()
does the actual work of transforming driver-domain
values into application-range values.
BoundedTransform
base class.
The abstract BoundedTransform
class presented as Listing 2
implements the lower and upper fields required to identify range boundaries. BoundedTransform
extends ContinuousDistributionTransform
. The two bounded transforms which do not actually
leverage ContinuousDistributionTransform
functionality simply never make calls to
getDistribution()
.
© Charles Ames | Page created: 2022-08-29 | Last updated: 2022-08-29 |