T
- the sample typepublic interface Sample<T>
result()
value.arity() >= 1
.Modifier and Type | Method and Description |
---|---|
T |
argAt(int index)
Return the argument value with the given
index . |
int |
arity()
Return the dimensionality of the sample point arguments.
|
static <T> Sample<T> |
of(T[] sample)
Create a new sample point from the given argument and sample result.
|
static Sample<Double> |
ofDouble(double x,
double y)
Create a new sample point from the given argument and sample result.
|
static Sample<Double> |
ofDouble(double x1,
double x2,
double y)
Create a new sample point from the given argument and sample result.
|
static Sample<Double> |
ofDouble(double x1,
double x2,
double x3,
double y)
Create a new sample point from the given argument and sample result.
|
T |
result()
Return the result of the sample point.
|
int arity()
T argAt(int index)
index
.index
- the argument indexindex
ArrayIndexOutOfBoundsException
- if the given index
is not
within the given range [0, arity)
arity()
static <T> Sample<T> of(T[] sample)
f: sample[0:sample.length-1] -> sample[sample.length-1]
. The last
array element contains the result and the first n-1 elements are function
arguments.T
- the sample typesample
- the sample point resultIllegalArgumentException
- if the argument array is emptyNullPointerException
- if the argument array is null
static Sample<Double> ofDouble(double x, double y)
f: x -> y
x
- the argumenty
- the sample point resultstatic Sample<Double> ofDouble(double x1, double x2, double y)
f: (x1, x2) -> y
x1
- the first argumentx2
- the second argumenty
- the sample point resultstatic Sample<Double> ofDouble(double x1, double x2, double x3, double y)
f: (x1, x2, x3) -> y
x1
- the first argumentx2
- the second argumentx3
- the second argumenty
- the sample point result© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)