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

Pops a double precision real element off the stack or queue. More...

Private Member Functions

real(kind=default_precision) function stack_pop_real (specificstack)
 Pops an element off the stack (LIFO). Converts between precision and from int. More...
 
real(kind=default_precision) function queue_pop_real (specificqueue)
 Pops the queue element off the head of the queue (FIFO). Converts between precision and from int. More...
 

Detailed Description

Pops a double precision real element off the stack or queue.

This has a time complexity of O(1)

Parameters
collectionThe specific stack or queue involved
Returns
Double precision real element which has been popped off the collection or raises and error if none is found

Definition at line 185 of file collections.F90.

Member Function/Subroutine Documentation

◆ queue_pop_real()

real(kind=default_precision) function collections_mod::c_pop_real::queue_pop_real ( type(queue_type), intent(inout)  specificqueue)
private

Pops the queue element off the head of the queue (FIFO). Converts between precision and from int.

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

Parameters
specificqueueThe specific queue involved
Returns
Double precision real element at head of the queue or raises an error if there is none

Definition at line 2592 of file collections.F90.

2592  type(queue_type), intent(inout) :: specificqueue
2593  real(kind=DEFAULT_PRECISION) :: queue_pop_real
2594 
2595  class(*), pointer :: generic
2596 
2597  generic=>queue_pop_generic(specificqueue)
2598  if (.not. associated(generic)) call log_log(log_error, "Can not pop real from queue")
2599  select type(vr=>generic)
2600  type is (real(kind=default_precision))
2601  queue_pop_real=vr
2602  type is (real)
2603  queue_pop_real=conv_single_real_to_double(vr)
2604  type is (integer)
2605  queue_pop_real=conv_single_real_to_double(conv_to_real(vr))
2606  end select

◆ stack_pop_real()

real(kind=default_precision) function collections_mod::c_pop_real::stack_pop_real ( type(stack_type), intent(inout)  specificstack)
private

Pops an element off the stack (LIFO). Converts between precision and from int.

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

Parameters
specificstackThe specific stack involved
Returns
Double precision real data of the last element added to the stack or raises an error if none is found

Definition at line 2296 of file collections.F90.

2296  type(stack_type), intent(inout) :: specificstack
2297  real(kind=DEFAULT_PRECISION) :: stack_pop_real
2298 
2299  class(*), pointer :: generic
2300 
2301  generic=>stack_pop_generic(specificstack)
2302  if (.not. associated(generic)) call log_log(log_error, "Can not pop real from stack")
2303  select type(vr=>generic)
2304  type is (real(kind=default_precision))
2305  stack_pop_real=vr
2306  type is (real)
2307  stack_pop_real=conv_single_real_to_double(vr)
2308  type is (integer)
2309  stack_pop_real=conv_single_real_to_double(conv_to_real(vr))
2310  end select

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