- All Known Implementing Classes:
SampleBuffer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
This interface represents a set of sample points, which can be evaluated with
a given evolved program.
- Since:
- 6.0
- Version:
- 7.1
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
This class represents the result of a sample calculation, which contains the array of calculated values and a corresponding array with expected sample values. -
Method Summary
Modifier and TypeMethodDescriptionEvaluates the givenprogram
tree with its sample points.default Sampling.Result
<T> Evaluates the givenfunction
tree with its sample points.static <T> Sampling
<T> Create a new sampling object from the given sample points.static <T> Sampling
<T> Create a new sampling object from the given sample points.
-
Method Details
-
eval
Evaluates the givenprogram
tree with its sample points. The returned result object may benull
if no sample point has been added to the sampling when calling theeval
method.- Parameters:
program
- the program to evaluate- Returns:
- the evaluated sample result. May be
null
if the sampling is empty and contains no sample points.
-
eval
Evaluates the givenfunction
tree with its sample points. The returned result object may benull
if no sample point has been added to the sampling when calling theeval
method.- Parameters:
function
- the function to evaluate- Returns:
- the evaluated sample result. May be
null
if the sampling is empty and contains no sample points.
-
of
Create a new sampling object from the given sample points.- Type Parameters:
T
- the sample type- Parameters:
samples
- the sample points- Returns:
- a new sampling object
- Since:
- 7.1
-
of
Create a new sampling object from the given sample points.- Type Parameters:
T
- the sample type- Parameters:
samples
- the sample points- Returns:
- a new sampling object
- Since:
- 7.1
-