sourcery_bin_m Module

distribute item numbers across bins such that the number of items differs by at most 1 between any two bins


Used by

  • module~~sourcery_bin_m~~UsedByGraph module~sourcery_bin_m sourcery_bin_m module~sourcery_bin_s sourcery_bin_s module~sourcery_bin_s->module~sourcery_bin_m module~sourcery_data_partition_m sourcery_data_partition_m module~sourcery_data_partition_m->module~sourcery_bin_m module~sourcery_m sourcery_m module~sourcery_m->module~sourcery_bin_m module~sourcery_m->module~sourcery_data_partition_m module~sourcery_data_partition_s sourcery_data_partition_s module~sourcery_data_partition_s->module~sourcery_data_partition_m module~sourcery_string_s sourcery_string_s module~sourcery_string_s->module~sourcery_m

Interfaces

public interface bin_t

  • private elemental module function construct(num_items, num_bins, bin_number) result(bin)

    the result is a bin associated with a range of item numbers

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: num_items
    integer, intent(in) :: num_bins
    integer, intent(in) :: bin_number

    Return Value type(bin_t)

interface

  • private elemental module function first(self) result(first_item_number)

    the result is the first item number associated with the given bin

    Arguments

    Type IntentOptional Attributes Name
    class(bin_t), intent(in) :: self

    Return Value integer

interface

  • private elemental module function last(self) result(last_item_number)

    the result is the last item number associated with the given bin

    Arguments

    Type IntentOptional Attributes Name
    class(bin_t), intent(in) :: self

    Return Value integer


Derived Types

type, public ::  bin_t

encapsulate a range of item numbers associated with a bin

Components

Type Visibility Attributes Name Initial
integer, private :: first_
integer, private :: last_

Constructor

private elemental, module function construct (num_items, num_bins, bin_number)

the result is a bin associated with a range of item numbers

Type-Bound Procedures

procedure, public :: first
procedure, public :: last