shuffle Interface

public interface shuffle

Shuffle an array along one dimension

This procedure shuffles an array along one dimension. The array can be of any rank, but the dimension along which to shuffle must be specified. An optional index array can also be shuffled.


Module Procedures

private subroutine shuffle_1Dilist(data, seed)

Shuffle a 1D array along one dimension

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), dimension(:) :: data

1D array to be shuffled

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_2Drdata(data, dim, seed)

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:) :: data

2D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_3Didata(data, dim, seed)

Shuffle a 3D array along one dimension

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), dimension(:,:,:) :: data

3D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_3Drdata(data, dim, seed)

Shuffle a 3D array along one dimension

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:,:) :: data

3D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_4Drdata(data, dim, seed)

Shuffle a 4D array along one dimension

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:,:,:) :: data

4D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_5Drdata(data, dim, seed)

Shuffle a 5D array along one dimension

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:,:,:,:) :: data

5D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_2Drdata_1Drlist(data, label, dim, seed, shuffle_list)

Shuffle a 2D array along one dimension

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:) :: data

2D array to be shuffled

real(kind=real32), intent(inout), dimension(:) :: label

1D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

integer, intent(out), optional, dimension(size(data,dim)) :: shuffle_list

Index array

private subroutine shuffle_3Didata_1Dilist(data, label, dim, seed)

Shuffle a 3D array along one dimension

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), dimension(:,:,:) :: data

3D array to be shuffled

integer, intent(inout), dimension(:) :: label

1D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_3Didata_1Drlist(data, label, dim, seed)

Shuffle a 3D array along one dimension

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), dimension(:,:,:) :: data

3D array to be shuffled

real(kind=real32), intent(inout), dimension(:) :: label

1D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_4Drdata_1Dilist(data, label, dim, seed)

Shuffle a 4D array along one dimension

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:,:,:) :: data

4D array to be shuffled

integer, intent(inout), dimension(:) :: label

1D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_5Drdata_1Dilist(data, label, dim, seed)

Shuffle a 5D array along one dimension

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:,:,:,:) :: data

5D array to be shuffled

integer, intent(inout), dimension(:) :: label

1D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

private subroutine shuffle_5Drdata_1Drlist(data, label, dim, seed, shuffle_list)

Shuffle a 5D array along one dimension

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:,:,:,:) :: data

5D array to be shuffled

real(kind=real32), intent(inout), dimension(:) :: label

1D array to be shuffled

integer, intent(in) :: dim

Dimension along which to shuffle

integer, intent(in), optional :: seed

Random seed

integer, intent(out), optional, dimension(size(data,dim)) :: shuffle_list

Index array