Package io.github.ai4ci.util
Class ImmutableTransformedDistribution
java.lang.Object
io.github.ai4ci.util.ImmutableTransformedDistribution
- All Implemented Interfaces:
Abstraction.Distribution
,TransformedDistribution
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTransformedDistribution
extends Object
implements TransformedDistribution
Immutable implementation of
TransformedDistribution
.
Use the builder to create immutable instances:
ImmutableTransformedDistribution.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableTransformedDistribution
. -
Field Summary
Fields inherited from interface io.github.ai4ci.abm.mechanics.Abstraction.Distribution
DX, PRECISION
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableTransformedDistribution
.copyOf
(TransformedDistribution instance) Creates an immutable copy of aTransformedDistribution
value.boolean
This instance is equal to all instances ofImmutableTransformedDistribution
that have equal attribute values.getLink()
int
hashCode()
Computes a hash code from attributes:baseDistribution
,link
,inverseLink
.Creates a builder forImmutableTransformedDistribution
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueTransformedDistribution
with attribute values.Copy the current immutable object by setting a value for thebaseDistribution
attribute.Copy the current immutable object by setting a value for theinverseLink
attribute.withLink
(DoubleUnaryOperator value) Copy the current immutable object by setting a value for thelink
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.abm.mechanics.Abstraction.Distribution
combine, getDensity, sample, transform, transform, transform
Methods inherited from interface io.github.ai4ci.util.TransformedDistribution
getCentral, getCumulative, getMedian, sample
-
Method Details
-
getBaseDistribution
- Specified by:
getBaseDistribution
in interfaceTransformedDistribution
- Returns:
- The value of the
baseDistribution
attribute
-
getLink
- Specified by:
getLink
in interfaceTransformedDistribution
- Returns:
- The value of the
link
attribute
-
getInverseLink
- Specified by:
getInverseLink
in interfaceTransformedDistribution
- Returns:
- The value of the
inverseLink
attribute
-
withBaseDistribution
Copy the current immutable object by setting a value for thebaseDistribution
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for baseDistribution- Returns:
- A modified copy of the
this
object
-
withLink
Copy the current immutable object by setting a value for thelink
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for link- Returns:
- A modified copy of the
this
object
-
withInverseLink
Copy the current immutable object by setting a value for theinverseLink
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for inverseLink- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableTransformedDistribution
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:baseDistribution
,link
,inverseLink
. -
toString
Prints the immutable valueTransformedDistribution
with attribute values. -
copyOf
Creates an immutable copy of aTransformedDistribution
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable TransformedDistribution instance
-
toBuilder
Creates a builder forImmutableTransformedDistribution
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableTransformedDistribution builder with attributes of
this
instance
-
builder
Creates a builder forImmutableTransformedDistribution
.ImmutableTransformedDistribution.builder() .setBaseDistribution(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // required
baseDistribution
.setLink(function.DoubleUnaryOperator) // requiredlink
.setInverseLink(function.DoubleUnaryOperator) // requiredinverseLink
.build();- Returns:
- A new ImmutableTransformedDistribution builder
-