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