MONC
Private Member Functions | List of all members
collections_mod::c_is_empty Interface Reference

Returns whether a collection is empty. More...

Private Member Functions

logical function list_is_empty (specificlist)
 Determines whether or not the list is empty. More...
 
logical function stack_is_empty (specificstack)
 Returns whether a stack is empty. More...
 
logical function queue_is_empty (specificqueue)
 Returns whether a queue is empty. More...
 
logical function map_is_empty (specificmap)
 Returns whether a map is empty. More...
 
logical function hashmap_is_empty (specificmap)
 Returns whether a hashmap is empty. More...
 
logical function hashset_is_empty (specificset)
 Determines whether or not the hashset is empty. More...
 

Detailed Description

Returns whether a collection is empty.

This has a time complexity of O(1)

Parameters
collectionThe specific list, stack queue or map involved
Returns
Whether the collection is empty

Definition at line 437 of file collections.F90.

Member Function/Subroutine Documentation

◆ hashmap_is_empty()

logical function collections_mod::c_is_empty::hashmap_is_empty ( type(hashmap_type), intent(inout)  specificmap)
private

Returns whether a hashmap is empty.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific hashmap involved
Returns
Whether the map is empty

Definition at line 1881 of file collections.F90.

1881  type(hashmap_type), intent(inout) :: specificmap
1882 
1883  hashmap_is_empty=(specificmap%size == 0)

◆ hashset_is_empty()

logical function collections_mod::c_is_empty::hashset_is_empty ( type(hashset_type), intent(in)  specificset)
private

Determines whether or not the hashset is empty.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificsetThe specific set involved
Returns
Whether the set is empty or not

Definition at line 2067 of file collections.F90.

2067  type(hashset_type), intent(in) :: specificset
2068 
2069  hashset_is_empty = specificset%size == 0

◆ list_is_empty()

logical function collections_mod::c_is_empty::list_is_empty ( type(list_type), intent(in)  specificlist)
private

Determines whether or not the list is empty.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificlistThe specific list involved
Returns
Whether the list is empty or not

Definition at line 3027 of file collections.F90.

3027  type(list_type), intent(in) :: specificlist
3028 
3029  list_is_empty = specificlist%size == 0

◆ map_is_empty()

logical function collections_mod::c_is_empty::map_is_empty ( type(map_type), intent(inout)  specificmap)
private

Returns whether a map is empty.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific map involved
Returns
Whether the map is empty

Definition at line 1210 of file collections.F90.

1210  type(map_type), intent(inout) :: specificmap
1211 
1212  map_is_empty = list_is_empty(specificmap%map_ds)

◆ queue_is_empty()

logical function collections_mod::c_is_empty::queue_is_empty ( type(queue_type), intent(inout)  specificqueue)
private

Returns whether a queue is empty.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificqueueThe specific queue involved
Returns
Whether the queue is empty

Definition at line 2748 of file collections.F90.

2748  type(queue_type), intent(inout) :: specificqueue
2749 
2750  queue_is_empty = list_is_empty(specificqueue%queue_ds)

◆ stack_is_empty()

logical function collections_mod::c_is_empty::stack_is_empty ( type(stack_type), intent(inout)  specificstack)
private

Returns whether a stack is empty.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificstackThe specific stack involved
Returns
Whether the stack is empty

Definition at line 2452 of file collections.F90.

2452  type(stack_type), intent(inout) :: specificstack
2453 
2454  stack_is_empty = list_is_empty(specificstack%stack_ds)

The documentation for this interface was generated from the following file: