Class that act as stacks, queues, and priority queues. See iArgDynamicArray_Class for more information on how to use this class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(iDynamicArray), | public | :: | i | Argument of the values. |
|||
type(iDynamicArray), | public | :: | v | Values. |
Overloaded by interface [[iArgDynamicArray(type)]]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in), | optional | :: | M | ||
logical, | intent(in), | optional | :: | sorted | ||
logical, | intent(in), | optional | :: | fixed |
Overloaded by interface [[iArgDynamicArray(type)]]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in) | :: | i(:) | |||
integer(kind=i32), | intent(in) | :: | values(:) | |||
integer(kind=i32), | intent(in), | optional | :: | M | ||
logical, | intent(in), | optional | :: | sorted | ||
logical, | intent(in), | optional | :: | fixed |
iArgDynamicArray%append() - Append a value to the end of the dynamic array. Will change a sorted dynamic array to unsorted.
Overloaded type bound procedure iArgDynamicArray%append().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | i | Index of value |
|||
integer(kind=i32) | :: | val | Value to append |
iArgDynamicArray%argOf() - Get the argument of a value in a sorted dynamic array
Overloaded type bound procedure iArgDynamicArray%locationOf().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | val | Value to get the argument of. |
Argument of the value.
iArgDynamicArray%%deallocate() - Deallocate a dynamic array.
Overloaded type bound procedure iArgDynamicArray%deallocate().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this |
iArgDynamicArray%insertAt() - Insert a value at a given index.
Overloaded type bound procedure iArgDynamicArray%insertAt().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | loc | Insert index and value at this location. |
|||
integer(kind=i32) | :: | i | index. |
|||
integer(kind=i32) | :: | val | Value. |
iArgDynamicArray%insertSorted() - Insert a value into a sorted dynamic array.
Overloaded type bound procedure iArgDynamicArray%insertSorted().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | i | Index. |
|||
integer(kind=i32) | :: | val | Value. |
iArgDynamicArray%insertSortedUnique() - Inserts only unique numbers into a dynamic array.
Overloaded type bound procedure iArgDynamicArray%insertSortedUnique().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | i | Index. |
|||
integer(kind=i32) | :: | val | Value. |
iArgDynamicArray%isEmpty() - True if the array is empty.
Overloaded type bound procedure iArgDynamicArray%isEmpty()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this |
Array is empty
iArgDynamicArray%isFilled() - True if the allocated memory has been filled.
Overloaded type bound procedure iArgDynamicArray%isFilled()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this |
Array is filled
iArgDynamicArray%locationOf() - Get the location of a value in a sorted dynamic array.
Overloaded type bound procedure iArgDynamicArray%locationOf().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | val | Value to get the argument of. |
Index of the value.
iArgDynamicArray%prepend() - Prepend a value to the start of the dynamic array. Only for unsorted dynamic arrays
Overloaded type bound procedure iArgDynamicArray%prepend().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | i | Prepend indices with this index. |
|||
integer(kind=i32) | :: | val | Prepend values with this value. |
iArgDynamicArray%remove() - Remove an element from the array.
Overloaded type bound procedure iArgDynamicArray%remove().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this | ||||
integer(kind=i32) | :: | i | Remove the elements at this location. |
iArgDynamicArray%tighten() - Removes excess buffer memory and trims it to the current length.
Overloaded type bound procedure iArgDynamicArray%tighten().
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(iArgDynamicArray) | :: | this |