distribute item numbers across bins such that the number of items differs by at most 1 between any two bins
the result is a bin associated with a range of item numbers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | num_items | |||
integer, | intent(in) | :: | num_bins | |||
integer, | intent(in) | :: | bin_number |
the result is the first item number associated with the given bin
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(bin_t), | intent(in) | :: | self |
the result is the last item number associated with the given bin
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(bin_t), | intent(in) | :: | self |
encapsulate a range of item numbers associated with a bin
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | first_ | ||||
integer, | private | :: | last_ |
private elemental, module function construct (num_items, num_bins, bin_number) | the result is a bin associated with a range of item numbers |
procedure, public :: first | |
procedure, public :: last |