rArgDynamicArray Derived Type

type, public :: rArgDynamicArray

type~~rargdynamicarray~~InheritsGraph type~rargdynamicarray rArgDynamicArray rDynamicArray rDynamicArray rDynamicArray->type~rargdynamicarray v iDynamicArray iDynamicArray iDynamicArray->type~rargdynamicarray i
Help


Class that act as stacks, queues, and priority queues. See rArgDynamicArray_Class for more information on how to use this class.



Components

TypeVisibility AttributesNameInitial
type(iDynamicArray), public :: i

Argument of the values.

type(rDynamicArray), public :: v

Values.


Constructor

public interface rArgDynamicArray

  • private function init_rArgDynamicArray_i1(M, sorted, fixed) result(this)

    Overloaded by interface [[rArgDynamicArray(type)]]

    Arguments

    Type IntentOptional AttributesName
    integer(kind=i32), intent(in), optional :: M
    logical, intent(in), optional :: sorted
    logical, intent(in), optional :: fixed

    Return Value type(rArgDynamicArray)

  • private function init_rArgDynamicArray_r1D(i, values, M, sorted, fixed) result(this)

    Overloaded by interface [[rArgDynamicArray(type)]]

    Arguments

    Type IntentOptional AttributesName
    integer(kind=i32), intent(in) :: i(:)
    real(kind=r32), intent(in) :: values(:)
    integer(kind=i32), intent(in), optional :: M
    logical, intent(in), optional :: sorted
    logical, intent(in), optional :: fixed

    Return Value type(rArgDynamicArray)


Type-Bound Procedures

procedure, public :: append => append_rArgDynamicArray

rArgDynamicArray%append() - Append a value to the end of the dynamic array. Will change a sorted dynamic array to unsorted.

  • private subroutine append_rArgDynamicArray(this, i, val)

    Overloaded type bound procedure rArgDynamicArray%append().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    integer(kind=i32) :: i

    Index of value

    real(kind=r32) :: val

    Value to append

procedure, public :: argOf => argOf_rArgDynamicArray

rArgDynamicArray%argOf() - Get the argument of a value in a sorted dynamic array

  • private function argOf_rArgDynamicArray(this, val) result(i)

    Overloaded type bound procedure rArgDynamicArray%locationOf().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    real(kind=r32) :: val

    Value to get the argument of.

    Return Value integer(kind=i32)

    Argument of the value.

procedure, public :: deallocate => deallocate_rArgDynamicArray

rArgDynamicArray%%deallocate() - Deallocate a dynamic array.

  • private subroutine deallocate_rArgDynamicArray(this)

    Overloaded type bound procedure rArgDynamicArray%deallocate().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this

procedure, public :: insertAt => insertAt_rArgDynamicArray

rArgDynamicArray%insertAt() - Insert a value at a given index.

  • private subroutine insertAt_rArgDynamicArray(this, loc, i, val)

    Overloaded type bound procedure rArgDynamicArray%insertAt().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    integer(kind=i32) :: loc

    Insert index and value at this location.

    integer(kind=i32) :: i

    index/

    real(kind=r32) :: val

    Value/

procedure, public :: insertSorted => insertSorted_rArgDynamicArray

rArgDynamicArray%insertSorted() - Insert a value into a sorted dynamic array.

  • private subroutine insertSorted_rArgDynamicArray(this, i, val)

    Overloaded type bound procedure rArgDynamicArray%insertSorted().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    integer(kind=i32) :: i

    Index.

    real(kind=r32) :: val

    Value.

procedure, public :: insertSortedUnique => insertSortedUnique_rArgDynamicArray

rArgDynamicArray%insertSortedUnique() - Inserts only unique numbers into a dynamic array.

  • private subroutine insertSortedUnique_rArgDynamicArray(this, i, val)

    Overloaded type bound procedure rArgDynamicArray%insertSortedUnique().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    integer(kind=i32) :: i

    Index.

    real(kind=r32) :: val

    Value.

procedure, public :: isEmpty => isEmpty_rArgDynamicArray

rArgDynamicArray%isEmpty() - True if the array is empty.

  • private function isEmpty_rArgDynamicArray(this) result(yes)

    Overloaded type bound procedure rArgDynamicArray%isEmpty()

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this

    Return Value logical

    Array is empty

procedure, public :: isFilled => isFilled_rArgDynamicArray

rArgDynamicArray%isFilled() - True if the allocated memory has been filled.

  • private function isFilled_rArgDynamicArray(this) result(yes)

    Overloaded type bound procedure rArgDynamicArray%isFilled()

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this

    Return Value logical

    Array is filled

procedure, public :: locationOf => locationOf_rArgDynamicArray

rArgDynamicArray%locationOf() - Get the location of a value in a sorted dynamic array.

  • private function locationOf_rArgDynamicArray(this, val) result(i)

    Overloaded type bound procedure rArgDynamicArray%locationOf().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    real(kind=r32) :: val

    Value to get the argument of.

    Return Value integer(kind=i32)

    Index of the value.

procedure, public :: prepend => prepend_rArgDynamicArray

rArgDynamicArray%prepend() - Prepend a value to the start of the dynamic array. Only for unsorted dynamic arrays

  • private subroutine prepend_rArgDynamicArray(this, i, val)

    Overloaded type bound procedure rArgDynamicArray%prepend().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    integer(kind=i32) :: i

    Prepend indices with this index.

    real(kind=r32) :: val

    Prepend values with this value.

procedure, public :: remove => remove_rArgDynamicArray

rArgDynamicArray%remove() - Remove an element from the array.

  • private subroutine remove_rArgDynamicArray(this, i)

    Overloaded type bound procedure rArgDynamicArray%remove().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this
    integer(kind=i32) :: i

    Remove the elements at this location.

procedure, public :: tighten => tighten_rArgDynamicArray

rArgDynamicArray%tighten() - Removes excess buffer memory and trims it to the current length.

  • private subroutine tighten_rArgDynamicArray(this)

    Overloaded type bound procedure rArgDynamicArray%tighten().

    Arguments

    Type IntentOptional AttributesName
    class(rArgDynamicArray) :: this