index_array Derived Type

type, public :: index_array

Type defining an array of consecutive integer numbers, useful as indices in arrays.


Contents


Components

TypeVisibility AttributesNameInitial
integer, public, allocatable:: indices(:)

Constructor

public interface index_array

  • public function new_index_array(length) result(this)

    Constructor for the index_array type

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: length

    Return Value type(index_array)


Type-Bound Procedures

procedure, public :: find_index

  • public subroutine find_index(index_in, mask)

    Type bound procedure that finds and pack all the array indices according to the given mask

    Arguments

    Type IntentOptional AttributesName
    class(index_array), intent(inout) :: index_in
    logical, intent(in) :: mask(:)