ITM Grid Service Library: Fortran 90
|
Functions/Subroutines | |
integer, dimension(ccounttotal, size(dmax)) | enumerate_combinations (dmax, dsum, cCountTotal) |
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. | |
subroutine | allocate_combinations (dmax, dsum, comb) |
Convenience routine: allocate and populate an array with all possible combinations. |
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,dimension(ccounttotal, size(dmax)) itm_combinations::enumerate_combinations | ( | integer,dimension(:),intent(in) | dmax, |
integer,intent(in) | dsum, | ||
integer,intent(in) | cCountTotal | ||
) |
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. Build a list of all possible combinations of the vector.
Definition at line 45 of file itm_combinations.f90.