dArgDynamicArray Derived Type

type, public :: dArgDynamicArray

type~~dargdynamicarray~~InheritsGraph type~dargdynamicarray dArgDynamicArray dDynamicArray dDynamicArray dDynamicArray->type~dargdynamicarray v iDynamicArray iDynamicArray iDynamicArray->type~dargdynamicarray i
Help


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



Components

TypeVisibility AttributesNameInitial
type(iDynamicArray), public :: i

Argument of the values.

type(dDynamicArray), public :: v

Values.


Constructor

public interface dArgDynamicArray

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

    Overloaded by interface [[dArgDynamicArray(type)]]

    Arguments

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

    Amount of memory to allocate.

    logical, intent(in), optional :: sorted

    Maintain a sorted array.

    logical, intent(in), optional :: fixed

    Maintain a fixed size array.

    Return Value type(dArgDynamicArray)

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

    Overloaded by interface [[dArgDynamicArray(type)]]

    Arguments

    Type IntentOptional AttributesName
    integer(kind=i32), intent(in) :: i(:)

    Set of value indices to initialize with.

    real(kind=r64), intent(in) :: values(:)

    Set of values to initialize with.

    integer(kind=i32), intent(in), optional :: M

    Amount of memory to allocate.

    logical, intent(in), optional :: sorted

    Maintain a sorted array.

    logical, intent(in), optional :: fixed

    Maintain a fixed size array.

    Return Value type(dArgDynamicArray)


Type-Bound Procedures

procedure, public :: append => append_dArgDynamicArray

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

  • private subroutine append_dArgDynamicArray(this, i, val)

    Overloaded type bound procedure dArgDynamicArray%append().

    Arguments

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

    Index of value

    real(kind=r64) :: val

    Value to append

procedure, public :: argOf => argOf_dArgDynamicArray

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

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

    Overloaded type bound procedure dArgDynamicArray%locationOf().

    Arguments

    Type IntentOptional AttributesName
    class(dArgDynamicArray) :: this
    real(kind=r64) :: val

    Value to get the argument of.

    Return Value integer(kind=i32)

    Argument of the value.

procedure, public :: deallocate => deallocate_dArgDynamicArray

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

  • private subroutine deallocate_dArgDynamicArray(this)

    Overloaded type bound procedure dArgDynamicArray%deallocate().

    Arguments

    Type IntentOptional AttributesName
    class(dArgDynamicArray) :: this

procedure, public :: insertAt => insertAt_dArgDynamicArray

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

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

    Overloaded type bound procedure dArgDynamicArray%insertAt().

    Arguments

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

    Insert index and value at this location.

    integer(kind=i32) :: i

    index/

    real(kind=r64) :: val

    Value/

procedure, public :: insertSorted => insertSorted_dArgDynamicArray

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

  • private subroutine insertSorted_dArgDynamicArray(this, i, val)

    Overloaded type bound procedure dArgDynamicArray%insertSorted().

    Arguments

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

    Index.

    real(kind=r64) :: val

    Value.

procedure, public :: insertSortedUnique => insertSortedUnique_dArgDynamicArray

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

  • private subroutine insertSortedUnique_dArgDynamicArray(this, i, val)

    Overloaded type bound procedure dArgDynamicArray%insertSortedUnique().

    Arguments

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

    Index.

    real(kind=r64) :: val

    Value.

procedure, public :: isEmpty => isEmpty_dArgDynamicArray

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

  • private function isEmpty_dArgDynamicArray(this) result(yes)

    Overloaded type bound procedure dArgDynamicArray%isEmpty()

    Arguments

    Type IntentOptional AttributesName
    class(dArgDynamicArray) :: this

    Return Value logical

    Array is empty

procedure, public :: isFilled => isFilled_dArgDynamicArray

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

  • private function isFilled_dArgDynamicArray(this) result(yes)

    Overloaded type bound procedure dArgDynamicArray%isFilled()

    Arguments

    Type IntentOptional AttributesName
    class(dArgDynamicArray) :: this

    Return Value logical

    Array is filled

procedure, public :: locationOf => locationOf_dArgDynamicArray

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

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

    Overloaded type bound procedure dArgDynamicArray%locationOf().

    Arguments

    Type IntentOptional AttributesName
    class(dArgDynamicArray) :: this
    real(kind=r64) :: val

    Value to get the argument of.

    Return Value integer(kind=i32)

    Index of the value.

procedure, public :: prepend => prepend_dArgDynamicArray

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

  • private subroutine prepend_dArgDynamicArray(this, i, val)

    Overloaded type bound procedure dArgDynamicArray%prepend().

    Arguments

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

    Prepend indices with this index.

    real(kind=r64) :: val

    Prepend values with this value.

procedure, public :: print => print_dArgDynamicArray

dArgDynamicArray%print() - Print to the screen

  • private subroutine print_dArgDynamicArray(this)

    Overloaded type bound procedure dArgDynamicArray%print()

    Arguments

    Type IntentOptional AttributesName
    class(dArgDynamicArray) :: this

procedure, public :: remove => remove_dArgDynamicArray

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

  • private subroutine remove_dArgDynamicArray(this, i)

    Overloaded type bound procedure dArgDynamicArray%remove().

    Arguments

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

    Remove the elements at this location.

procedure, public :: tighten => tighten_dArgDynamicArray

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

  • private subroutine tighten_dArgDynamicArray(this)

    Overloaded type bound procedure dArgDynamicArray%tighten().

    Arguments

    Type IntentOptional AttributesName
    class(dArgDynamicArray) :: this