vecfun Module



Contents


Interfaces

public interface push

returns a new vector with val pushed to the end of the input vector.

  • private pure function push_i1(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer(kind=i1), intent(in) :: val

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

  • private pure function push_i2(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer(kind=i2), intent(in) :: val

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

  • private pure function push_i4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer(kind=i4), intent(in) :: val

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

  • private pure function push_i8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer(kind=i8), intent(in) :: val

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

  • private pure function push_r4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    real(kind=r4), intent(in) :: val

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function push_r8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    real(kind=r8), intent(in) :: val

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function push_r16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    real(kind=r16), intent(in) :: val

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function push_c4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    complex(kind=r4), intent(in) :: val

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function push_c8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    complex(kind=r8), intent(in) :: val

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function push_c16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    complex(kind=r16), intent(in) :: val

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function push_str(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    character, intent(in) :: val

    Return Value character,dimension(:), allocatable

public interface pushto

returns a new vector with val pushed to idx of the input vector.

  • private pure function pushto_i1(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer(kind=i1), intent(in) :: val
    integer, intent(in) :: idx

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

  • private pure function pushto_i2(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer(kind=i2), intent(in) :: val
    integer, intent(in) :: idx

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

  • private pure function pushto_i4(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer(kind=i4), intent(in) :: val
    integer, intent(in) :: idx

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

  • private pure function pushto_i8(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer(kind=i8), intent(in) :: val
    integer, intent(in) :: idx

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

  • private pure function pushto_r4(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    real(kind=r4), intent(in) :: val
    integer, intent(in) :: idx

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function pushto_r8(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    real(kind=r8), intent(in) :: val
    integer, intent(in) :: idx

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function pushto_r16(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    real(kind=r16), intent(in) :: val
    integer, intent(in) :: idx

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function pushto_c4(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    complex(kind=r4), intent(in) :: val
    integer, intent(in) :: idx

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function pushto_c8(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    complex(kind=r8), intent(in) :: val
    integer, intent(in) :: idx

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function pushto_c16(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    complex(kind=r16), intent(in) :: val
    integer, intent(in) :: idx

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function pushto_str(vec, val, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    character, intent(in) :: val
    integer, intent(in) :: idx

    Return Value character,dimension(:), allocatable

public interface pushnew

returns a new vector adding val to the input vector but only if val is not already in the input vector.

  • private pure function pushnew_i1(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer(kind=i1), intent(in) :: val

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

  • private pure function pushnew_i2(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer(kind=i2), intent(in) :: val

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

  • private pure function pushnew_i4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer(kind=i4), intent(in) :: val

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

  • private pure function pushnew_i8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer(kind=i8), intent(in) :: val

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

  • private pure function pushnew_r4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    real(kind=r4), intent(in) :: val

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function pushnew_r8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    real(kind=r8), intent(in) :: val

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function pushnew_r16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    real(kind=r16), intent(in) :: val

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function pushnew_c4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    complex(kind=r4), intent(in) :: val

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function pushnew_c8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    complex(kind=r8), intent(in) :: val

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function pushnew_c16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    complex(kind=r16), intent(in) :: val

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function pushnew_str(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    character, intent(in) :: val

    Return Value character,dimension(:), allocatable

public interface pop

returns a new vector by deleting the last element in the input vector, or if idx is provided, then delete the element at index idx

  • private pure function pop_i1(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

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

  • private pure function pop_i2(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

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

  • private pure function pop_i4(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

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

  • private pure function pop_i8(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

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

  • private pure function pop_r4(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function pop_r8(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function pop_r16(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function pop_c4(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function pop_c8(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function pop_c16(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function pop_str(vec, idx) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    integer, intent(in), optional :: idx

    Return Value character,dimension(:), allocatable

public interface popval

returns a new vector with val deleted from the input vector. only the first val is deleted if there are more vals in the input vector.

  • private pure function popval_i1(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer(kind=i1), intent(in) :: val

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

  • private pure function popval_i2(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer(kind=i2), intent(in) :: val

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

  • private pure function popval_i4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer(kind=i4), intent(in) :: val

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

  • private pure function popval_i8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer(kind=i8), intent(in) :: val

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

  • private pure function popval_r4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    real(kind=r4), intent(in) :: val

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function popval_r8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    real(kind=r8), intent(in) :: val

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function popval_r16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    real(kind=r16), intent(in) :: val

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function popval_c4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    complex(kind=r4), intent(in) :: val

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function popval_c8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    complex(kind=r8), intent(in) :: val

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function popval_c16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    complex(kind=r16), intent(in) :: val

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function popval_str(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    character, intent(in) :: val

    Return Value character,dimension(:), allocatable

public interface popall

returns a new vector with all vals deleted from the input vector.

  • private pure function popall_i1(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer(kind=i1), intent(in) :: val

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

  • private pure function popall_i2(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer(kind=i2), intent(in) :: val

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

  • private pure function popall_i4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer(kind=i4), intent(in) :: val

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

  • private pure function popall_i8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer(kind=i8), intent(in) :: val

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

  • private pure function popall_r4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    real(kind=r4), intent(in) :: val

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function popall_r8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    real(kind=r8), intent(in) :: val

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function popall_r16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    real(kind=r16), intent(in) :: val

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function popall_c4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    complex(kind=r4), intent(in) :: val

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function popall_c8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    complex(kind=r8), intent(in) :: val

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function popall_c16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    complex(kind=r16), intent(in) :: val

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function popall_str(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    character, intent(in) :: val

    Return Value character,dimension(:), allocatable

public interface concat

returns a new vector joining two input vectors.

  • private pure function concat_i1(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function concat_i2(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function concat_i4(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function concat_i8(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function concat_r4(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec1
    real(kind=r4), intent(in), dimension(:), allocatable:: vec2

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function concat_r8(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec1
    real(kind=r8), intent(in), dimension(:), allocatable:: vec2

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function concat_r16(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec1
    real(kind=r16), intent(in), dimension(:), allocatable:: vec2

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function concat_c4(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec1
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec2

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function concat_c8(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec1
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec2

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function concat_c16(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec1
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec2

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function concat_str(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec1
    character, intent(in), dimension(:), allocatable:: vec2

    Return Value character,dimension(:), allocatable

public interface echo

alternative to spread, it returns a new vector by replicating the elements in the input vector val times.

  • private pure function echo_i1(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function echo_i2(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function echo_i4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function echo_i8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function echo_r4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function echo_r8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function echo_r16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function echo_c4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function echo_c8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function echo_c16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function echo_str(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value character,dimension(:), allocatable

public interface unique

returns a new vector compring the unique elements of the input vector. a faster implementation is provided for pre-sorted inputs.

  • private pure function unique_i1(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

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

  • private pure function unique_i2(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

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

  • private pure function unique_i4(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

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

  • private pure function unique_i8(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

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

  • private pure function unique_r4(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function unique_r8(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function unique_r16(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function unique_c4(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function unique_c8(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function unique_c16(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function unique_str(vec, sorted) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    logical, intent(in) :: sorted

    Return Value character,dimension(:), allocatable

public interface reverse

returns a new vector reversing the elements of the input. alternative to b = a[j:k:-1]

  • private pure function reverse_i1(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec

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

  • private pure function reverse_i2(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec

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

  • private pure function reverse_i4(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec

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

  • private pure function reverse_i8(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec

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

  • private pure function reverse_r4(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function reverse_r8(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function reverse_r16(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function reverse_c4(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function reverse_c8(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function reverse_c16(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function reverse_str(vec) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec

    Return Value character,dimension(:), allocatable

public interface every

returns a new vector comprising every other consecutive val from the input vector. for example, every second element consecutively.

  • private pure function every_i1(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function every_i2(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function every_i4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function every_i8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private pure function every_r4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function every_r8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function every_r16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function every_c4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function every_c8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function every_c16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function every_str(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value character,dimension(:), allocatable

public interface zip

returns a new vector, sequentially joining two other input vectors. for example, a=[1,2]; b=[3,4]; c=zip(a,b)=[1,3,2,4]

  • private pure function zip_i1(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function zip_i2(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function zip_i4(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function zip_i8(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec1
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec2

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

  • private pure function zip_r4(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec1
    real(kind=r4), intent(in), dimension(:), allocatable:: vec2

    Return Value real(kind=r4),dimension(:), allocatable

  • private pure function zip_r8(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec1
    real(kind=r8), intent(in), dimension(:), allocatable:: vec2

    Return Value real(kind=r8),dimension(:), allocatable

  • private pure function zip_r16(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec1
    real(kind=r16), intent(in), dimension(:), allocatable:: vec2

    Return Value real(kind=r16),dimension(:), allocatable

  • private pure function zip_c4(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec1
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec2

    Return Value complex(kind=r4),dimension(:), allocatable

  • private pure function zip_c8(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec1
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec2

    Return Value complex(kind=r8),dimension(:), allocatable

  • private pure function zip_c16(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec1
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec2

    Return Value complex(kind=r16),dimension(:), allocatable

  • private pure function zip_str(vec1, vec2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec1
    character, intent(in), dimension(:), allocatable:: vec2

    Return Value character,dimension(:), allocatable

public interface popevery

returns a new vector sequentially deleting every other element from the input vector using the fortran pack function.

  • private function popevery_i1(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private function popevery_i2(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private function popevery_i4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private function popevery_i8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

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

  • private function popevery_r4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r4),dimension(:), allocatable

  • private function popevery_r8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r8),dimension(:), allocatable

  • private function popevery_r16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value real(kind=r16),dimension(:), allocatable

  • private function popevery_c4(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r4),dimension(:), allocatable

  • private function popevery_c8(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r8),dimension(:), allocatable

  • private function popevery_c16(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value complex(kind=r16),dimension(:), allocatable

  • private function popevery_str(vec, val) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    integer, intent(in) :: val

    Return Value character,dimension(:), allocatable

public interface replace

returns a new vector replacing elements in the input vector.

  • private function replace_i1(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer(kind=i1) :: val1
    integer(kind=i1) :: val2

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

  • private function replace_i2(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer(kind=i2) :: val1
    integer(kind=i2) :: val2

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

  • private function replace_i4(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer(kind=i4) :: val1
    integer(kind=i4) :: val2

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

  • private function replace_i8(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer(kind=i8) :: val1
    integer(kind=i8) :: val2

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

  • private function replace_r4(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    real(kind=r4) :: val1
    real(kind=r4) :: val2

    Return Value real(kind=r4),dimension(:), allocatable

  • private function replace_r8(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    real(kind=r8) :: val1
    real(kind=r8) :: val2

    Return Value real(kind=r8),dimension(:), allocatable

  • private function replace_r16(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    real(kind=r16) :: val1
    real(kind=r16) :: val2

    Return Value real(kind=r16),dimension(:), allocatable

  • private function replace_c4(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    complex(kind=r4) :: val1
    complex(kind=r4) :: val2

    Return Value complex(kind=r4),dimension(:), allocatable

  • private function replace_c8(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    complex(kind=r8) :: val1
    complex(kind=r8) :: val2

    Return Value complex(kind=r8),dimension(:), allocatable

  • private function replace_c16(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    complex(kind=r16) :: val1
    complex(kind=r16) :: val2

    Return Value complex(kind=r16),dimension(:), allocatable

  • private function replace_str(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    character :: val1
    character :: val2

    Return Value character,dimension(:), allocatable

public interface swap

returns a new vector, swapping elements in the input vector.

  • private function swap_i1(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i1), intent(in), dimension(:), allocatable:: vec
    integer(kind=i1) :: val1
    integer(kind=i1) :: val2

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

  • private function swap_i2(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i2), intent(in), dimension(:), allocatable:: vec
    integer(kind=i2) :: val1
    integer(kind=i2) :: val2

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

  • private function swap_i4(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i4), intent(in), dimension(:), allocatable:: vec
    integer(kind=i4) :: val1
    integer(kind=i4) :: val2

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

  • private function swap_i8(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=i8), intent(in), dimension(:), allocatable:: vec
    integer(kind=i8) :: val1
    integer(kind=i8) :: val2

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

  • private function swap_r4(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r4), intent(in), dimension(:), allocatable:: vec
    real(kind=r4) :: val1
    real(kind=r4) :: val2

    Return Value real(kind=r4),dimension(:), allocatable

  • private function swap_r8(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r8), intent(in), dimension(:), allocatable:: vec
    real(kind=r8) :: val1
    real(kind=r8) :: val2

    Return Value real(kind=r8),dimension(:), allocatable

  • private function swap_r16(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=r16), intent(in), dimension(:), allocatable:: vec
    real(kind=r16) :: val1
    real(kind=r16) :: val2

    Return Value real(kind=r16),dimension(:), allocatable

  • private function swap_c4(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r4), intent(in), dimension(:), allocatable:: vec
    complex(kind=r4) :: val1
    complex(kind=r4) :: val2

    Return Value complex(kind=r4),dimension(:), allocatable

  • private function swap_c8(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r8), intent(in), dimension(:), allocatable:: vec
    complex(kind=r8) :: val1
    complex(kind=r8) :: val2

    Return Value complex(kind=r8),dimension(:), allocatable

  • private function swap_c16(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=r16), intent(in), dimension(:), allocatable:: vec
    complex(kind=r16) :: val1
    complex(kind=r16) :: val2

    Return Value complex(kind=r16),dimension(:), allocatable

  • private function swap_str(vec, val1, val2) result(res)

    Arguments

    TypeIntentOptionalAttributesName
    character, intent(in), dimension(:), allocatable:: vec
    character :: val1
    character :: val2

    Return Value character,dimension(:), allocatable