deque_mod Module

module~~deque_mod~~UsesGraph module~deque_mod deque_mod module~queue_mod queue_mod module~queue_mod->module~deque_mod module~abstract_container_mod abstract_container_mod module~abstract_container_mod->module~deque_mod module~ordered_mod ordered_mod module~abstract_container_mod->module~ordered_mod module~iterator_mod iterator_mod module~abstract_container_mod->module~iterator_mod module~iterable_mod iterable_mod module~abstract_container_mod->module~iterable_mod module~ordered_mod->module~queue_mod module~iterator_mod->module~ordered_mod module~iterator_mod->module~iterable_mod module~countable_mod countable_mod module~countable_mod->module~ordered_mod module~iterable_mod->module~ordered_mod module~iterable_mod->module~countable_mod iso_fortran_env iso_fortran_env iso_fortran_env->module~abstract_container_mod
Help

Provides a doubled ended queue abstract data type. This is a first in first out data structure which can be added to or taken from at either end.

Used By

module~~deque_mod~~UsedByGraph module~deque_mod deque_mod module~list_mod list_mod module~deque_mod->module~list_mod module~array_list_mod array_list_mod module~list_mod->module~array_list_mod module~multimap_mod multimap_mod module~array_list_mod->module~multimap_mod module~data_set_mod data_set_mod module~array_list_mod->module~data_set_mod module~dictionary_mod dictionary_mod module~array_list_mod->module~dictionary_mod module~data_set_mod->module~dictionary_mod module~dynamic_set_mod dynamic_set_mod module~data_set_mod->module~dynamic_set_mod module~dictionary_mod->module~multimap_mod module~map_mod map_mod module~dictionary_mod->module~map_mod module~multiset_mod multiset_mod module~dynamic_set_mod->module~multiset_mod module~map_mod->module~multimap_mod
Help

Abstract Interfaces

abstract interface

  • private pure subroutine push_sub(this, item)

    Arguments

    Type IntentOptional AttributesName
    class(deque), intent(inout) :: this
    class(*), intent(in) :: item

    The value to be added to the list

abstract interface

  • private function pop_func(this)

    Arguments

    Type IntentOptional AttributesName
    class(deque), intent(inout) :: this

    Return Value class(container), allocatable

    The next value, which has just been removed

abstract interface

  • private pure function peek_func(this)

    Arguments

    Type IntentOptional AttributesName
    class(deque), intent(in) :: this

    Return Value class(container), allocatable

    The next value, which is not removed


Derived Types

type, public, abstract, extends(queue) :: deque

Type-Bound Procedures

procedure(push_sub), public, deferred :: pushleft

Add an item to the left end of the data structure (equivalent to push on a queue)

procedure(push_sub), public, deferred :: pushright

Add an item to the right end of the data structure

procedure(pop_func), public, deferred :: popleft

Remove and return the item from the left end of the data structure

procedure(pop_func), public, deferred :: popright

Remove and return the item from the right end of the data structure (equivalent to pop on a queue)

procedure(peek_func), public, deferred :: peekleft

Return, but do not remove, the item at the left end of the data structure

procedure(peek_func), public, deferred :: peekright

Return, but do not remove, the item at the left end of the data structure (equivalent to peek on a queue)

Description

An abstract data type representing the double ended queue data structure. Rather than just pushing items to one end (the "left end") and popping them from the other (the "right end"), items can be pushed or popped to/from either the right or the left.