allCombinations Interface

interface
public pure module function allCombinations(array) result(res)

Arguments

Type IntentOptional Attributes Name
type(IntArray), intent(in), dimension(:) :: array

Return Value integer(kind=ik),dimension(:,:),allocatable

Description

Convert IntArray(:) vector into a 2D array of shape (size(IntArray),:) containing all possible combination of IntArray(:)%entries. Works only for sizes 1 and 3