This module implements a fixed list, that has a fixed size and cannot be resized.
It also has pointers, allowing to build a linked list structure.
Example:
program example_fixed_list
use datastructs_fortran
use kinds_mod
implicit none
type ( fixed_list_t ) :: my_list
type ( fixed_list_t ), target :: my_list2
my_list = fixed_list ([ 1 , 2 , 3 , 4 , 5 ])
my_list2 = fixed_list ([ 6 , 7 , 8 ])
call my_list % print ()
my_list % next => my_list2
call my_list % next % print ()
end program example_fixed_list
module~~datastructs_lists_fixed_list_mod~~UsesGraph
module~datastructs_lists_fixed_list_mod
datastructs_lists_fixed_list_mod
module~datastructs_kinds_mod
datastructs_kinds_mod
module~datastructs_lists_fixed_list_mod->module~datastructs_kinds_mod
iso_fortran_env
iso_fortran_env
module~datastructs_kinds_mod->iso_fortran_env
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
module~~datastructs_lists_fixed_list_mod~~UsedByGraph
module~datastructs_lists_fixed_list_mod
datastructs_lists_fixed_list_mod
module~datastructs_lists_mod
datastructs_lists_mod
module~datastructs_lists_mod->module~datastructs_lists_fixed_list_mod
module~datastructs_mod
datastructs_mod
module~datastructs_mod->module~datastructs_lists_mod
module~datastructs_samplers_rejection_maxheap_composition_mod
datastructs_samplers_rejection_maxheap_composition_mod
module~datastructs_samplers_rejection_maxheap_composition_mod->module~datastructs_lists_mod
module~datastructs_samplers_rejection_maxheap_mod
datastructs_samplers_rejection_maxheap_mod
module~datastructs_samplers_rejection_maxheap_composition_mod->module~datastructs_samplers_rejection_maxheap_mod
module~datastructs_samplers_rejection_maxheap_mod->module~datastructs_lists_mod
module~datastructs_samplers_rejection_maxheap_two_classes_mod
datastructs_samplers_rejection_maxheap_two_classes_mod
module~datastructs_samplers_rejection_maxheap_two_classes_mod->module~datastructs_lists_mod
module~datastructs_samplers_rejection_maxheap_two_classes_mod->module~datastructs_samplers_rejection_maxheap_mod
module~datastructs_samplers_rejection_mod
datastructs_samplers_rejection_mod
module~datastructs_samplers_rejection_mod->module~datastructs_lists_mod
module~datastructs_samplers_rejection_two_classes_mod
datastructs_samplers_rejection_two_classes_mod
module~datastructs_samplers_rejection_two_classes_mod->module~datastructs_lists_mod
module~datastructs_samplers_rejection_two_classes_mod->module~datastructs_samplers_rejection_mod
proc~choose_sampler
choose_sampler
proc~choose_sampler->module~datastructs_samplers_rejection_maxheap_composition_mod
proc~choose_sampler->module~datastructs_samplers_rejection_maxheap_mod
proc~choose_sampler->module~datastructs_samplers_rejection_maxheap_two_classes_mod
proc~choose_sampler->module~datastructs_samplers_rejection_mod
proc~choose_sampler->module~datastructs_samplers_rejection_two_classes_mod
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Interfaces
Constructor for a fixed list
Derived Types
Type for a fixed list, that can be used as a list of lists
Components
Type
Visibility Attributes
Name
Initial
integer(kind=i4),
public
::
initial_index
Metadata
integer(kind=i4),
public
::
final_index
Metadata
integer(kind=i4),
public
::
n
=
0
integer(kind=i4),
public,
allocatable
::
list (:)
type(fixed_list_t ),
public,
pointer
::
next
type(fixed_list_t ),
public,
pointer
::
prev
Finalizations Procedures
final :: finalize_fixed_list
Type-Bound Procedures
procedure, public ::
init => fixed_list_init
procedure, public ::
sum => fixed_list_sum
procedure, public ::
print => fixed_list_print
Functions
Create a new fixed list pointer
Input: list - an array of integers
Arguments
Type
Intent Optional Attributes
Name
integer(kind=i4),
intent(in)
::
list (:)
Return Value
type(fixed_list_t ), pointer