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