- 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThis 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 givenprogramtree with its sample points.default Sampling.Result<T> Evaluates the givenfunctiontree 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 givenprogramtree with its sample points. The returned result object may benullif no sample point has been added to the sampling when calling theevalmethod.- Parameters:
program- the program to evaluate- Returns:
- the evaluated sample result. May be
nullif the sampling is empty and contains no sample points.
-
eval
Evaluates the givenfunctiontree with its sample points. The returned result object may benullif no sample point has been added to the sampling when calling theevalmethod.- Parameters:
function- the function to evaluate- Returns:
- the evaluated sample result. May be
nullif 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
-