Interface CandidateSelection<T>
-
- Type Parameters:
T
- the type of the records.
- All Known Subinterfaces:
OfflineCandidateSelection<T>
,OnlineCandidateSelection<T>
- All Known Implementing Classes:
OnlineSortedNeighborhoodMethod
- 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 CandidateSelection<T>
Selects candidates from a static or dynamic dataset accessible through Iterables.The dataset might be stored off-heap and retrieved on demand.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NonNull java.util.Collection<Candidate<T>>
selectCandidates(@NonNull java.lang.Iterable<? extends T> records)
Selects the candidates for the given records and materializes them.@NonNull java.util.stream.Stream<Candidate<T>>
selectCandidates(@NonNull java.util.stream.Stream<? extends T> records)
Selects the candidates for the given records.
-
-
-
Method Detail
-
selectCandidates
@NonNull @NonNull java.util.stream.Stream<Candidate<T>> selectCandidates(@NonNull @NonNull java.util.stream.Stream<? extends T> records)
Selects the candidates for the given records.- Parameters:
records
- the dataset for which the candidates are generated.- Returns:
- the generated candidates.
- Implementation Requirements:
- It is assumed that this method will work stateless. Derivations need to be documented., The output of the method should be repeatable traversable. Derivations need to be documented.
-
selectCandidates
@NonNull default @NonNull java.util.Collection<Candidate<T>> selectCandidates(@NonNull @NonNull java.lang.Iterable<? extends T> records)
Selects the candidates for the given records and materializes them.For online algorithms this method can only be applied on a finite stream.
- Parameters:
records
- the dataset for which the candidates are generated.- Returns:
- the generated candidates.
- Implementation Requirements:
- It is assumed that this method will work stateless. Derivations need to be documented.
-
-