Package io.github.ai4ci.util
Class ImmutableEmpiricalFunction
java.lang.Object
io.github.ai4ci.util.ImmutableEmpiricalFunction
- All Implemented Interfaces:
Abstraction.SimpleFunction
,EmpiricalFunction
,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableEmpiricalFunction
extends Object
implements EmpiricalFunction
Immutable implementation of
EmpiricalFunction
.
Use the builder to create immutable instances:
ImmutableEmpiricalFunction.builder()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableEmpiricalFunction
.Nested classes/interfaces inherited from interface io.github.ai4ci.util.EmpiricalFunction
EmpiricalFunction.Link
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableEmpiricalFunction
.static ImmutableEmpiricalFunction
copyOf
(EmpiricalFunction instance) Creates an immutable copy of aEmpiricalFunction
value.boolean
This instance is equal to all instances ofImmutableEmpiricalFunction
that have equal attribute values.getLink()
double
getMax()
double
getMin()
double[]
getX()
double[]
getY()
int
hashCode()
Computes a hash code from attributes:x
,y
,link
,min
,max
,interpolator
.Creates a builder forImmutableEmpiricalFunction
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueEmpiricalFunction
with attribute values.withLink
(EmpiricalFunction.Link value) Copy the current immutable object by setting a value for thelink
attribute.withX
(double... elements) Copy the current immutable object with elements that replace the content ofx
.withY
(double... elements) Copy the current immutable object with elements that replace the content ofy
.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.util.EmpiricalFunction
normalise, value
-
Method Details
-
getX
public double[] getX()- Specified by:
getX
in interfaceEmpiricalFunction
- Returns:
- A cloned
x
array
-
getY
public double[] getY()- Specified by:
getY
in interfaceEmpiricalFunction
- Returns:
- A cloned
y
array
-
getLink
- Specified by:
getLink
in interfaceEmpiricalFunction
- Returns:
- The value of the
link
attribute
-
getMin
public double getMin()- Specified by:
getMin
in interfaceEmpiricalFunction
- Returns:
- The computed-at-construction value of the
min
attribute
-
getMax
public double getMax()- Specified by:
getMax
in interfaceEmpiricalFunction
- Returns:
- The computed-at-construction value of the
max
attribute
-
getInterpolator
- Specified by:
getInterpolator
in interfaceEmpiricalFunction
- Returns:
- The computed-at-construction value of the
interpolator
attribute
-
withX
Copy the current immutable object with elements that replace the content ofx
. The array is cloned before being saved as attribute values.- Parameters:
elements
- The non-null elements for x- Returns:
- A modified copy of
this
object
-
withY
Copy the current immutable object with elements that replace the content ofy
. The array is cloned before being saved as attribute values.- Parameters:
elements
- The non-null elements for y- Returns:
- A modified copy of
this
object
-
withLink
Copy the current immutable object by setting a value for thelink
attribute. A value 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
-
equals
This instance is equal to all instances ofImmutableEmpiricalFunction
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:x
,y
,link
,min
,max
,interpolator
. -
toString
Prints the immutable valueEmpiricalFunction
with attribute values. -
copyOf
Creates an immutable copy of aEmpiricalFunction
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 EmpiricalFunction instance
-
toBuilder
Creates a builder forImmutableEmpiricalFunction
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableEmpiricalFunction builder with attributes of
this
instance
-
builder
Creates a builder forImmutableEmpiricalFunction
.ImmutableEmpiricalFunction.builder() .setX(double) // required
x
.setY(double) // requiredy
.setLink(io.github.ai4ci.util.EmpiricalFunction.Link) // optionallink
.build();- Returns:
- A new ImmutableEmpiricalFunction builder
-