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

Returns the number of elements in the collection. More...

Private Member Functions

integer function list_size (specificlist)
 Returns the number of elements in a list. More...
 
integer function stack_size (specificstack)
 Returns the number of elements held on the stack. More...
 
integer function queue_size (specificqueue)
 Returns the number of elements held in a queue. More...
 
integer function map_size (specificmap)
 Returns the number of elements in the map. More...
 
integer function hashmap_size (specificmap)
 Returns the number of elements in the hashmap. More...
 
integer function hashset_size (specificset)
 Returns the number of elements in a list. More...
 

Detailed Description

Returns the number of elements in the collection.

This has a time complexity of O(1)

Parameters
collectionThe specific list, queue, stack or map involved
Returns
Number of elements in the collection

Definition at line 428 of file collections.F90.

Member Function/Subroutine Documentation

◆ hashmap_size()

integer function collections_mod::c_size::hashmap_size ( type(hashmap_type), intent(inout)  specificmap)
private

Returns the number of elements in the hashmap.

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

Parameters
specificmapThe specific hashmap involved
Returns
Number of key-value pairs held in the map

Definition at line 1870 of file collections.F90.

1870  type(hashmap_type), intent(inout) :: specificmap
1871 
1872  hashmap_size=specificmap%size

◆ hashset_size()

integer function collections_mod::c_size::hashset_size ( type(hashset_type), intent(in)  specificset)
private

Returns the number of elements in a list.

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

Parameters
specificlistThe specific list involved
Returns
Number of list elements

Definition at line 2152 of file collections.F90.

2152  type(hashset_type), intent(in) :: specificset
2153 
2154  hashset_size = specificset%size

◆ list_size()

integer function collections_mod::c_size::list_size ( type(list_type), intent(in)  specificlist)
private

Returns the number of elements in a list.

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

Parameters
specificlistThe specific list involved
Returns
Number of list elements

Definition at line 3176 of file collections.F90.

3176  type(list_type), intent(in) :: specificlist
3177 
3178  list_size = specificlist%size

◆ map_size()

integer function collections_mod::c_size::map_size ( type(map_type), intent(inout)  specificmap)
private

Returns the number of elements in the map.

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

Parameters
specificmapThe specific map involved
Returns
Number of key-value pairs held in the map

Definition at line 1199 of file collections.F90.

1199  type(map_type), intent(inout) :: specificmap
1200 
1201  map_size = list_size(specificmap%map_ds)

◆ queue_size()

integer function collections_mod::c_size::queue_size ( type(queue_type), intent(inout)  specificqueue)
private

Returns the number of elements held in a queue.

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

Parameters
specificqueueThe specific queue involved
Returns
Number of elements in the queue

Definition at line 2737 of file collections.F90.

2737  type(queue_type), intent(inout) :: specificqueue
2738 
2739  queue_size = list_size(specificqueue%queue_ds)

◆ stack_size()

integer function collections_mod::c_size::stack_size ( type(stack_type), intent(inout)  specificstack)
private

Returns the number of elements held on the stack.

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

Parameters
specificstackThe specific stack involved
Returns
Number of stack elements

Definition at line 2441 of file collections.F90.

2441  type(stack_type), intent(inout) :: specificstack
2442 
2443  stack_size = list_size(specificstack%stack_ds)

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