Package com.anylogic.engine
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class java.lang.Object
- Field Detail
- Constructor Detail
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- CustomDistribution
- Method Detail
- java.lang.Object
-
- com.anylogic.engine.CustomDistribution
- All Implemented Interfaces:
java.io.Serializable
public class CustomDistribution
extends java.lang.Object
implements java.io.Serializable
This class is used to generate random numbers from a probability density
function (PDF) defined as a number of pairs (value,rate) with possible
interpolation. You can supply the value and rate arrays directly, or
construct a distribution from a TableFunction. Each draw requires a random
number generator, so there are two different modes the CustomDistribution
can work:
1. You do not provide the RNG in the constructor, but supply it each time you call get( Random ). In this case the CustomDistribution can safely be made static and shared across multiple models and objects.
2. You provide the RNG in the constructor, the RNG is then remembered in the CustomDistribution and you can use get() method without any parameters. This is simpler syntax, but such CustomDistribution cannot be shared between models with different RNGs used. The get( Random ) method can still be used in that case.
1. You do not provide the RNG in the constructor, but supply it each time you call get( Random ). In this case the CustomDistribution can safely be made static and shared across multiple models and objects.
2. You provide the RNG in the constructor, the RNG is then remembered in the CustomDistribution and you can use get() method without any parameters. This is simpler syntax, but such CustomDistribution cannot be shared between models with different RNGs used. The get( Random ) method can still be used in that case.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
static class |
CustomDistribution.InterpolationType |
|
Modifier and Type | Class | Description |
---|
static CustomDistribution.InterpolationType |
INTERPOLATION_LINEAR |
|
static CustomDistribution.InterpolationType |
INTERPOLATION_NONE |
|
static CustomDistribution.InterpolationType |
INTERPOLATION_STEP |
|
Modifier and Type | Field | Description |
---|
CustomDistribution(double[] observations) |
Constructs a custom empirical distribution from the given array of
observations.
|
CustomDistribution(double[] intervalStarts,
double[] numberOfObservations) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(double[] values,
double[] rates,
CustomDistribution.InterpolationType interpolationtype) |
Constructs a custom distribution from the given arrays of values and rates, and
a given interpolation type.
|
CustomDistribution(double[] values,
double[] rates,
CustomDistribution.InterpolationType interpolationtype,
Utilities owner) |
Constructs a custom distribution from the given arrays of values and rates, and
a given interpolation type.
|
CustomDistribution(double[] values,
double[] rates,
CustomDistribution.InterpolationType interpolationtype,
java.util.Random rng) |
Constructs a custom distribution from the given arrays of values and rates, and
a given interpolation type.
|
CustomDistribution(double[] intervalStarts,
double[] numberOfObservations,
Utilities owner) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(double[] intervalStarts,
double[] numberOfObservations,
java.util.Random rng) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(double[] intervalStarts,
int[] numberOfObservations) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(double[] intervalStarts,
int[] numberOfObservations,
Utilities owner) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(double[] intervalStarts,
int[] numberOfObservations,
java.util.Random rng) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(double[] observations,
Utilities owner) |
Constructs a custom empirical distribution from the given array of
observations.
|
CustomDistribution(double[] observations,
java.util.Random rng) |
Constructs a custom empirical distribution from the given array of
observations.
|
CustomDistribution(int[] observations) |
Constructs a custom discrete empirical distribution from the given array of discrete
observations.
|
CustomDistribution(int[] intervalStarts,
double[] numberOfObservations) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(int[] intervalStarts,
double[] numberOfObservations,
Utilities owner) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(int[] intervalStarts,
double[] numberOfObservations,
java.util.Random rng) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(int[] intervalStarts,
int[] numberOfObservations) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(int[] intervalStarts,
int[] numberOfObservations,
Utilities owner) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(int[] intervalStarts,
int[] numberOfObservations,
java.util.Random rng) |
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
|
CustomDistribution(int[] observations,
Utilities owner) |
Constructs a custom discrete empirical distribution from the given array of discrete
observations.
|
CustomDistribution(int[] observations,
java.util.Random rng) |
Constructs a custom discrete empirical distribution from the given array of discrete
observations.
|
CustomDistribution(TableFunction table) |
Constructs a custom distribution from a given TableFunction.
|
CustomDistribution(TableFunction table,
java.util.Random rng) |
Constructs a custom distribution from a given TableFunction.
|
Constructor | Description |
---|
double |
get() |
Returns a random value distributed according to the given table of (value,rate) pairs.
|
double |
get(double min,
double max,
double shift,
double stretch) |
Generates a sample of truncated custom distribution.
This method uses the random number generator set during construction and throws exception if no RNG was set. This distribution is sketched by sketch coefficient,
then shifted to the right by shift , after that it is
truncated to fit in [min, max] interval. |
double |
get(double min,
double max,
double shift,
double stretch,
java.util.Random rng) |
Generates a sample of truncated custom distribution.
This method requires a random number generator. |
double |
get(java.util.Random rng) |
Returns a random value distributed according to the given table of (value,rate) pairs.
|
int |
getInt() |
Returns a random value distributed according to the given table of (value,rate) pairs.
|
int |
getInt(java.util.Random rng) |
Returns a random value distributed according to the given table of (value,rate) pairs.
|
java.lang.String |
toString() |
Returns the textual representation of the custom distribution.
|
Modifier and Type | Method | Description |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final CustomDistribution.InterpolationType INTERPOLATION_NONE
public static final CustomDistribution.InterpolationType INTERPOLATION_STEP
public static final CustomDistribution.InterpolationType INTERPOLATION_LINEAR
public CustomDistribution(int[] intervalStarts, int[] numberOfObservations)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.
public CustomDistribution(int[] intervalStarts, int[] numberOfObservations, java.util.Random rng)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.rng
- the random number generator that will be used
public CustomDistribution(int[] intervalStarts, int[] numberOfObservations, Utilities owner)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator will be obtained from the given
The random number generator will be obtained from the given
owner
(agent/experiment).- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.owner
- owner of distribution, will be used as a source of random number generation
public CustomDistribution(int[] intervalStarts, double[] numberOfObservations)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.
public CustomDistribution(int[] intervalStarts, double[] numberOfObservations, java.util.Random rng)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.rng
- the random number generator that will be used
public CustomDistribution(int[] intervalStarts, double[] numberOfObservations, Utilities owner)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator will be obtained from the given
The random number generator will be obtained from the given
owner
(agent/experiment).- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.owner
- owner of distribution, will be used as a source of random number generation
public CustomDistribution(double[] intervalStarts, int[] numberOfObservations)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.
public CustomDistribution(double[] intervalStarts, int[] numberOfObservations, java.util.Random rng)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.rng
- the random number generator that will be used
public CustomDistribution(double[] intervalStarts, int[] numberOfObservations, Utilities owner)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator will be obtained from the given
The random number generator will be obtained from the given
owner
(agent/experiment).- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.owner
- owner of distribution, will be used as a source of random number generation
public CustomDistribution(double[] intervalStarts, double[] numberOfObservations)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.
public CustomDistribution(double[] intervalStarts, double[] numberOfObservations, java.util.Random rng)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.rng
- the random number generator that will be used
public CustomDistribution(double[] intervalStarts, double[] numberOfObservations, Utilities owner)
Constructs a custom empirical distribution from the given arrays of interval starts and number
of observations found in the corresponding intervals.
Note that some arrays are used by reference and can be modified.
The random number generator will be obtained from the given
The random number generator will be obtained from the given
owner
(agent/experiment).- Parameters:
intervalStarts
- the array of interval starts (2 or more, no duplicates, can be sorted or not), the last number is the end of the last intervalnumberOfObservations
- the array of observation counters (same size as values, no negative rates), the last number isn't actually used, it is assumed to be zero.owner
- owner of distribution, will be used as a source of random number generation
public CustomDistribution(double[] values, double[] rates, CustomDistribution.InterpolationType interpolationtype)
Constructs a custom distribution from the given arrays of values and rates, and
a given interpolation type. Note that arrays are not copied; they are
used by reference and can be modified.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
values
- the array of values (2 or more, no duplicates, can be sorted or not)rates
- the array of probability rates (same size as values, no negative rates)interpolationtype
- the interpolation type: INTERPOLATION_NONE, INTERPOLATION_STEP, or INTERPOLATION_LINEAR
public CustomDistribution(TableFunction table)
Constructs a custom distribution from a given TableFunction. Takes table function's
interpolation type and check if it can be supported. Note that arrays are not
copied: the table function arrays are used by reference.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
table
- the table function
public CustomDistribution(double[] values, double[] rates, CustomDistribution.InterpolationType interpolationtype, java.util.Random rng)
Constructs a custom distribution from the given arrays of values and rates, and
a given interpolation type. Note that arrays are not copied; they are
used by reference and can be modified.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
values
- the array of values (2 or more, no duplicates, can be sorted or not)rates
- the array of probability rates (same size as values, no negative rates)interpolationtype
- the interpolation type: INTERPOLATION_NONE, INTERPOLATION_STEP, or INTERPOLATION_LINEARrng
- the random number generator that will be used
public CustomDistribution(double[] values, double[] rates, CustomDistribution.InterpolationType interpolationtype, Utilities owner)
Constructs a custom distribution from the given arrays of values and rates, and
a given interpolation type. Note that arrays are not copied; they are
used by reference and can be modified.
The random number generator will be obtained from the given
The random number generator will be obtained from the given
owner
(agent/experiment).- Parameters:
values
- the array of values (2 or more, no duplicates, can be sorted or not)rates
- the array of probability rates (same size as values, no negative rates)interpolationtype
- the interpolation type: INTERPOLATION_NONE, INTERPOLATION_STEP, or INTERPOLATION_LINEARowner
- owner of distribution, will be used as a source of random number generation
public CustomDistribution(TableFunction table, java.util.Random rng)
Constructs a custom distribution from a given TableFunction. Takes table function's
interpolation type and check if it can be supported. Note that arrays are not
copied: the table function arrays are used by reference.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
table
- the table functionrng
- the random number generator that will be used
public CustomDistribution(double[] observations)
Constructs a custom empirical distribution from the given array of
observations. Note that array is used internally by reference and can be modified.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
observations
- the array of observed values (at least one value, can be sorted or not)
public CustomDistribution(double[] observations, Utilities owner)
Constructs a custom empirical distribution from the given array of
observations. Note that array is used internally by reference and can be modified.
The random number generator will be obtained from the given
The random number generator will be obtained from the given
owner
(agent/experiment).- Parameters:
observations
- the array of observed values (at least one value, can be sorted or not)owner
- owner of distribution, will be used as a source of random number generation
public CustomDistribution(double[] observations, java.util.Random rng)
Constructs a custom empirical distribution from the given array of
observations. Note that array is used internally by reference and can be modified.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
observations
- the array of observed values (at least one value, can be sorted or not)rng
- the random number generator that will be used
public CustomDistribution(int[] observations)
Constructs a custom discrete empirical distribution from the given array of discrete
observations. Note that array is used internally by reference and can be modified.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
The random number generator is not set after this constructor and must then be provided in each call of get( Random ) method.
- Parameters:
observations
- the array of observed values (at least one value, can be sorted or not)
public CustomDistribution(int[] observations, java.util.Random rng)
Constructs a custom discrete empirical distribution from the given array of discrete
observations. Note that array is used internally by reference and can be modified.
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
The random number generator is set after this constructor, so you can use both get() and get( Random ) methods. The default RNG can be accessed as getDefaultRandomGenerator() if called from
Agent
or Experiment
.- Parameters:
observations
- the array of observed values (at least one value, can be sorted or not)
public CustomDistribution(int[] observations, Utilities owner)
Constructs a custom discrete empirical distribution from the given array of discrete
observations. Note that array is used internally by reference and can be modified.
The random number generator will be obtained from the given
The random number generator will be obtained from the given
owner
(agent/experiment).- Parameters:
observations
- the array of observed values (at least one value, can be sorted or not)owner
- owner of distribution, will be used as a source of random number generation
public int getInt(java.util.Random rng)
Returns a random value distributed according to the given table of (value,rate) pairs.
This method requires a random number generator. If you are calling it from
an
Agent
or an Experiment
and wish to use the default RNG of the
simulation engine you may write get( getDefaultRandomGenerator() ).- Parameters:
rng
- the random number generator to be used.- Returns:
- the random value
public double get(java.util.Random rng)
Returns a random value distributed according to the given table of (value,rate) pairs.
This method requires a random number generator. If you are calling it from
an
Agent
or an Experiment
and wish to use the default RNG of the
simulation engine you may write get( getDefaultRandomGenerator() ).- Parameters:
rng
- the random number generator to be used.- Returns:
- the random value
public double get()
Returns a random value distributed according to the given table of (value,rate) pairs.
This method uses the random number generator set during construction and throws
exception if no RNG was set.
- Returns:
- the random value
public int getInt()
Returns a random value distributed according to the given table of (value,rate) pairs.
This method uses the random number generator set during construction and throws
exception if no RNG was set.
- Returns:
- the random value
public double get(double min, double max, double shift, double stretch, java.util.Random rng)
Generates a sample of truncated custom distribution.
This method requires a random number generator. If you are calling it from an
This distribution is sketched by
For more details see
This method requires a random number generator. If you are calling it from an
Agent
or an Experiment
and wish to use the default RNG of the
simulation engine you may write get( getDefaultRandomGenerator() ).This distribution is sketched by
sketch
coefficient,
then shifted to the right by shift
, after that it is
truncated to fit in [min, max]
interval.
Truncation is performed by discarding
every sample outside this interval and taking subsequent try.For more details see
get(Random)
- Parameters:
min
- the minimum value that this function will return. The distribution is truncated to return values above this. If the sample (stretched and shifted) is below this value it will be discarded and another sample will be drawn. Use-infinity
for "No limit".max
- the maximum value that this function will return. The distribution is truncated to return values below this. If the sample (stretched and shifted) is bigger than this value it will be discarded and another sample will be drawn. Use+infinity
for "No limit".shift
- the shift parameter that indicates how much the (stretched) distribution will shifted to the rightstretch
- the stretch parameter that indicates how much the distribution will be stretchedrng
- the random number generator.- Returns:
- the generated sample
public double get(double min, double max, double shift, double stretch)
Generates a sample of truncated custom distribution.
This method uses the random number generator set during construction and throws exception if no RNG was set.
This distribution is sketched by
For more details see
This method uses the random number generator set during construction and throws exception if no RNG was set.
This distribution is sketched by
sketch
coefficient,
then shifted to the right by shift
, after that it is
truncated to fit in [min, max]
interval.
Truncation is performed by discarding
every sample outside this interval and taking subsequent try.For more details see
get()
- Parameters:
min
- the minimum value that this function will return. The distribution is truncated to return values above this. If the sample (stretched and shifted) is below this value it will be discarded and another sample will be drawn. Use-infinity
for "No limit".max
- the maximum value that this function will return. The distribution is truncated to return values below this. If the sample (stretched and shifted) is bigger than this value it will be discarded and another sample will be drawn. Use+infinity
for "No limit".shift
- the shift parameter that indicates how much the (stretched) distribution will shifted to the rightstretch
- the stretch parameter that indicates how much the distribution will be stretched- Returns:
- the generated sample
public java.lang.String toString()
Returns the textual representation of the custom distribution.
- Overrides:
toString
in classjava.lang.Object
- Returns:
- the textual representation of the custom distribution
-
How can we improve this article?
-