Cartesius Library
|
Linked lists based on the module link_mod.f90. More...
Data Types | |
type | list |
Functions/Subroutines | |
subroutine | printlist (this) |
subroutine | addvalue (this, value, pDeallocator) |
Appends a new value to the end of the linked list. Current value is unaffected. More... | |
logical function | list_any_no_params (this, proc) |
logical function | list_any_one_param (this, proc, par1) |
logical function | list_contains (this, value) |
Returns true if the given value points to the same target as some value in the list. More... | |
type(list) function | copylist (this) |
subroutine | appendlist (this, newList) |
Appends a new list to the linked list. Current values are unaffected. More... | |
subroutine | mergelist (this, addList) |
Appends the second list's values to the first one without repetitions. More... | |
subroutine | list_swap_indices (this, index1, index2) |
Swaps the values stored in he links at the given indices. More... | |
subroutine | rotate_list_left (this) |
Moves the first element of the given list to the end of the list. More... | |
class(*) function, pointer | firstvalue (this) |
Returns a pointer to the first value in the linked list. More... | |
class(*) function, pointer | currentvalue (this) |
Returns a pointer to the value in the link to which the list iterator currently points. More... | |
subroutine | next (this) |
Moves the list iterator to the next link in the list. More... | |
logical function | morevalues (this) |
Returns true if the pointer to a link is associated, and false otherwise. More... | |
subroutine | reset (this) |
Resets link iterator to point at the first link in the list. More... | |
integer function | list_index (this, value) |
type(link) function, pointer | list_link_at_index (this, index) |
class(*) function, pointer | list_value_at_index (this, index) |
subroutine | removecurrentvalue (this) |
Removes the current value from the list. The pointer is set to the previous element in the list. If the prevoius element does not exit, the pointer is set to the next element. More... | |
subroutine | dissolvelist (this) |
Deallocates the list's links without deallocating its values. More... | |
subroutine | purgecurrentvalue (this) |
Removes the current value from the list and deallocates its contents. The pointer is set to the previous element in the list. If the prevoius element does not exit, the pointer is set to the next element. More... | |
type(list) function, pointer | list_from_polymorphic (x) |
Converts a polymorpihc pointer to a list pointer if possible, else returns a null-pointer. More... | |
subroutine | deallocate_list (pList) |
Deallocates all values in the list. More... | |
subroutine | deallocate_list_native (this) |
integer function | list_len (this) |
subroutine | sortlistbykey (someList, pKey) |
Sorts values in the list. More... | |
logical function | sortkey (x1, x2) |
Dummy key for soriting. Always returns true. More... | |
logical function | integerkey (x1, x2) |
Key for sorting integers. Returns true if x1 is less than x2. More... | |
recursive subroutine | sortpreparedlistbykey (someList, pKey) |
Helper process for sortListByKey. More... | |
recursive subroutine | listcatenationwithsorting (list1, list2, newList, pKey) |
Helper process for sortPreparedListByKey. More... | |
Linked lists based on the module link_mod.f90.
subroutine polymorphic_list_mod::addvalue | ( | class(list) | this, |
class(*), pointer | value, | ||
procedure(deallocatorprocedure), intent(in), optional, pointer | pDeallocator | ||
) |
Appends a new value to the end of the linked list. Current value is unaffected.
Appends a new list to the linked list. Current values are unaffected.
class(*) function, pointer polymorphic_list_mod::currentvalue | ( | class(list) | this | ) |
Returns a pointer to the value in the link to which the list iterator currently points.
subroutine polymorphic_list_mod::deallocate_list | ( | class(*), intent(inout), pointer | pList | ) |
Deallocates all values in the list.
subroutine polymorphic_list_mod::deallocate_list_native | ( | type(list), intent(inout) | this | ) |
subroutine polymorphic_list_mod::dissolvelist | ( | class(list) | this | ) |
Deallocates the list's links without deallocating its values.
class(*) function, pointer polymorphic_list_mod::firstvalue | ( | class(list) | this | ) |
Returns a pointer to the first value in the linked list.
logical function polymorphic_list_mod::integerkey | ( | class(*), pointer | x1, |
class(*), pointer | x2 | ||
) |
Key for sorting integers. Returns true if x1 is less than x2.
logical function polymorphic_list_mod::list_any_no_params | ( | class(list) | this, |
procedure(logical_fn_no_params), intent(in), pointer | proc | ||
) |
logical function polymorphic_list_mod::list_any_one_param | ( | class(list) | this, |
procedure(logical_fn_one_param), intent(in), pointer | proc, | ||
class(*), intent(in), pointer | par1 | ||
) |
logical function polymorphic_list_mod::list_contains | ( | class(list) | this, |
class(*), intent(in), pointer | value | ||
) |
Returns true if the given value points to the same target as some value in the list.
type(list) function, pointer polymorphic_list_mod::list_from_polymorphic | ( | class(*), intent(in), pointer | x | ) |
Converts a polymorpihc pointer to a list pointer if possible, else returns a null-pointer.
integer function polymorphic_list_mod::list_index | ( | class(list) | this, |
class(*), pointer | value | ||
) |
integer function polymorphic_list_mod::list_len | ( | class(list) | this | ) |
type(link) function, pointer polymorphic_list_mod::list_link_at_index | ( | class(list) | this, |
integer, intent(in) | index | ||
) |
subroutine polymorphic_list_mod::list_swap_indices | ( | class(list) | this, |
integer, intent(in) | index1, | ||
integer, intent(in) | index2 | ||
) |
Swaps the values stored in he links at the given indices.
class(*) function, pointer polymorphic_list_mod::list_value_at_index | ( | class(list) | this, |
index | |||
) |
recursive subroutine polymorphic_list_mod::listcatenationwithsorting | ( | type(list), intent(in) | list1, |
type(list), intent(in) | list2, | ||
type(list), intent(inout) | newList, | ||
procedure(sortkey), pointer | pKey | ||
) |
Helper process for sortPreparedListByKey.
Appends the second list's values to the first one without repetitions.
logical function polymorphic_list_mod::morevalues | ( | class(list) | this | ) |
Returns true if the pointer to a link is associated, and false otherwise.
subroutine polymorphic_list_mod::next | ( | class(list) | this | ) |
Moves the list iterator to the next link in the list.
subroutine polymorphic_list_mod::printlist | ( | class(list) | this | ) |
subroutine polymorphic_list_mod::purgecurrentvalue | ( | class(list) | this | ) |
Removes the current value from the list and deallocates its contents. The pointer is set to the previous element in the list. If the prevoius element does not exit, the pointer is set to the next element.
subroutine polymorphic_list_mod::removecurrentvalue | ( | class(list) | this | ) |
Removes the current value from the list. The pointer is set to the previous element in the list. If the prevoius element does not exit, the pointer is set to the next element.
subroutine polymorphic_list_mod::reset | ( | class(list) | this | ) |
Resets link iterator to point at the first link in the list.
subroutine polymorphic_list_mod::rotate_list_left | ( | class(list) | this | ) |
Moves the first element of the given list to the end of the list.
logical function polymorphic_list_mod::sortkey | ( | class(*), pointer | x1, |
class(*), pointer | x2 | ||
) |
Dummy key for soriting. Always returns true.
subroutine polymorphic_list_mod::sortlistbykey | ( | type(list), intent(inout) | someList, |
procedure(sortkey), pointer | pKey | ||
) |
Sorts values in the list.
pKey | points to a logical function. When the funtions returns true, the links stay in the same order, and exchange otherwise. |