Package io.jenetics.prog.regression
Interface Sampling<T>
-
- 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.
@FunctionalInterface public interface Sampling<T>
This interface represents a set of sample points, which can be evaluated with a given evolved program.- Since:
- 6.0
- Version:
- 6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Sampling.Result<T>
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Sampling.Result<T>
eval(Tree<? extends Op<T>,?> program)
Evaluates the givenprogram
tree with its sample points.
-
-
-
Method Detail
-
eval
Sampling.Result<T> eval(Tree<? extends Op<T>,?> program)
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.
-
-