Package io.openml.gearbox.interval
Class Window
java.lang.Object
io.openml.gearbox.interval.Window
Algorithms on problems that involves concepts of "window".
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Window
public Window()
-
-
Method Details
-
minWindow
Given 2 lists of elements called "source list" and "target list", this method returns the minimum window in source list that contains all of the elements from the target list.For example, if the elements are all characters:
- source list =
['A', 'D', 'O', 'B', 'E', 'C', 'O', 'D', 'E', 'B', 'A', 'N', 'C']
- target list =
['A', 'B', 'C']
['B', 'A', 'N', 'C']
.If there is no such window in source that covers all elements in target, the method returns an
empty list
- Type Parameters:
E
- The type of elements in two lists- Parameters:
source
- The source listtarget
- The target list- Returns:
- a sub-consecutive portion of the source list that includes all elements of the target list
- Throws:
NullPointerException
- if either list isnull
- source list =
-