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