Class ListLinearGrouping<C extends Comparable<C>>

java.lang.Object
org.uma.jmetal.util.grouping.impl.ListGrouping<C>
org.uma.jmetal.util.grouping.impl.ListLinearGrouping<C>
Type Parameters:
C -
All Implemented Interfaces:
CollectionGrouping<List<C>>

public class ListLinearGrouping<C extends Comparable<C>> extends ListGrouping<C>
Class that groups a list of Comparable entities by order in the collection. The number of groups is a constructor parameter and the group size is computed by dividing the list size by the number of groups. If the remainder of this division is not zero, the last group will contain the remaining index values (so, its size would be higher than the size of the rest of groups). To avoid unnecessary recomputing of the groups, the state variable lastListSize records the size of the last list that was grouped and only recomputes the groups if the size of the new list is different.
Author:
Antonio J. Nebro