Class type Group.grouping_spec

class type grouping_spec = object .. end
A way of grouping and presenting an ordered collection of groups of contests. This is one of the central abstractions of Tournabox.

method name : string
The name of the grouping_spec. A legal value of the comma-separated tournabox-groups container attribue.
method header_spec : num_rounds:int -> num_groups:int -> pos:int -> t -> Columns.header_spec
Returns a Columns.header_spec to specify how to display the header of a group. Most of the parameters are only used by `By Round' to calculate the round number displayed.

Given the total number of rounds in the tournabox upon completion; the number of groups in the Group.GroupList (i.e. the number of rounds played so far), the index of the group in the Group.GroupList (i.e. the round); and the group in need of a header.

All of the grouping_specs except Grouping_specs.round simply look at the first contest in the group, and pull out a prominent field like name or country.

method compare_contest : contest -> contest -> int
Compares two contests for the purposes of sorting them within a group.
method compare_group : t -> t -> int
Compares two groups for the purposes of sorting them within a GroupList.
method in_group : contest -> t -> group_result
Returns whether a contest is in a group. If the return value has Group.group_result.quit = true, then give up: stop trying to find a group to put the contest in.
method column_extractor : num_contests:int -> index:int -> contest -> Columns.column list
Returns the columns to render for a contest. Given the number of contests in the group; the index of the contest in the group; and the contest.