public class RetainNHistoryPartitionMethod extends Object implements HistoryPartitionMethod
Partition the event list by retaining a fixed number of elements.
Constructor and Description |
---|
RetainNHistoryPartitionMethod(int n)
Create a count partitioner.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
int |
partition(List<? extends Event> data)
Compute a partition of of the data.
|
String |
toString() |
public RetainNHistoryPartitionMethod(int n)
Create a count partitioner.
n
- The number of items to put in the train partition.public int partition(List<? extends Event> data)
HistoryPartitionMethod
Compute a partition of of the data.
partition
in interface HistoryPartitionMethod
data
- The data to partition.