ITM Grid Service Library: Fortran 90
 All Classes Files Functions Variables
itm_combinations Module Reference

Public Member Functions

integer recursive function count_combinations (dmax, dsum)
 Service routines for counting and enumerating combinations of a vector (i_1, ..., i_n), with the range of every component i_j is 0 <= i_j <= d_j and for the sum of all components holds sum(i_j) = dsum for a given value of dsum.
recursive function enumerate_combinations (dmax, dsum, cCountTotal)
 Build a list of all possible combinations of the vector.
subroutine allocate_combinations (dmax, dsum, comb)
 Convenience routine: allocate and populate an array with all possible combinations.

Detailed Description

Definition at line 1 of file itm_combinations.f90.

Member Function/Subroutine Documentation

subroutine itm_combinations::allocate_combinations ( integer, dimension(:), intent(in)  dmax,
integer, intent(in)  dsum,
integer, dimension(:, :), allocatable  comb 
)

Convenience routine: allocate and populate an array with all possible combinations.

Definition at line 77 of file itm_combinations.f90.

integer recursive function itm_combinations::count_combinations ( integer, dimension(:), intent(in)  dmax,
integer, intent(in)  dsum 
)

Service routines for counting and enumerating combinations of a vector (i_1, ..., i_n), with the range of every component i_j is 0 <= i_j <= d_j and for the sum of all components holds sum(i_j) = dsum for a given value of dsum.

These routines are used to build lists of all possible object classes of a given dimension for a given grid. d_j is then the dimension of space j (stored in the vector dmax), and dsum the dimension of the grid objects under consideration. Compute the number of possible combinations for the vector.

Definition at line 18 of file itm_combinations.f90.

recursive function itm_combinations::enumerate_combinations ( integer, dimension(:), intent(in)  dmax,
integer, intent(in)  dsum,
integer, intent(in)  cCountTotal 
)

Build a list of all possible combinations of the vector.

Definition at line 45 of file itm_combinations.f90.


The documentation for this module was generated from the following file: