Class SkippingIntervalFunction<E extends Comparable<E>>
java.lang.Object
io.openml.gearbox.algorithms.interval.SkippingIntervalFunction<E>
- Type Parameters:
E- The type of the end point object of this interval. For example, integer type 2024 or 2025 as in the interval [2024, 2025).
public class SkippingIntervalFunction<E extends Comparable<E>>
extends Object
implements Function<Interval<E>, Optional<Interval<E>>>
A
Function that, given a list of Interval's and BiPredicate, locates (if any) an element
interval not fully before a specified interval, runs the test predicate on that located interval,
and returns that interval if the interval passes the test
Semantically, it's returning from a list of ordered intervals the first one that overlaps with the one passed to the
apply(Interval); in addition that overlapping one will be returned only if the two satisfies a joint
condition. For example, if the list is ["2014/2016", "2018/2020"] and the joint condition is "sub-interval of the
in-list interval", then apply(Interval) would
- return
"2018/2020"on "2018/2019" - return
Optional.empty()on "2022/2025"
-
Constructor Summary
ConstructorsConstructorDescriptionSkippingIntervalFunction(List<Interval<E>> intervals, BiPredicate<Interval<E>, Interval<E>> predicate) Constructor. -
Method Summary
-
Constructor Details
-
SkippingIntervalFunction
public SkippingIntervalFunction(List<Interval<E>> intervals, BiPredicate<Interval<E>, Interval<E>> predicate) Constructor.- Parameters:
intervals- The list ofordered intervalspredicate- The predicate for testing the two overlapping intervals- Throws:
NullPointerException- ifintervalsorpredicateisnull
-
-
Method Details
-
apply
-