buds  0.1
FORTRAN reference counted types
Modules | Data Types | Functions/Subroutines | Variables

Detailed Description

real(selected_real_kind(15)) data type

Collaboration diagram for Real (double):

Modules

module  bud_fs_darray1d
 

Data Types

type  fs_darray1d
 Finite stack with cyclic ability. More...
 
interface  new
 Internal initialization of finite stack holding dArray1D. More...
 
interface  new_fs_darray1d
 See interface #new More...
 
interface  push
 Adds/Pushes new element to the stack. More...
 
interface  pop
 Pop and (possibly) return the latest item in the stack. More...
 
interface  keep
 Keeps a fixed number of elements in the stack. More...
 
interface  get_elem
 Retrieve specific element from the stack. More...
 
interface  get_elemp
 Retrieve pointer to specific element in the stack. More...
 
interface  size
 Query number of currently stored elements in this stack. More...
 
interface  size_max
 Query maximum number of allowed elements in this stack. More...
 
interface  print
 Print, to std-out, some basic information of the data-container. More...
 
interface  assignment(=)
 Assignment of bud to another bud. More...
 
interface  initialize
 Initialization of data container. More...
 
interface  is_initialized
 Query whether bud is associated with any data. More...
 
interface  initialized
 See interface is_initialized More...
 
interface  is_initd
 See interface is_initialized More...
 
interface  is_same
 Check whether two buds point to the same data (function) More...
 
interface  same
 See interface #is_same More...
 
interface  delete
 Deletes the bud by decreasing references to the underlying data. More...
 
interface  nullify
 Nullifies the current bud. More...
 
interface  references
 Query number of references to the bud. More...
 
interface  refs
 See interface #references More...
 

Functions/Subroutines

procedure, public delete => delete_
 See interface delete More...
 
procedure, public nullify => nullify_
 See interface nullify More...
 
procedure, public initialize => initialize_
 See interface initialize More...
 
procedure, public is_initialized => is_initialized_
 See interface is_initialized More...
 
procedure, public is_initd => is_initialized_
 See interface is_initialized More...
 
procedure, public initialized => is_initialized_
 See interface is_initialized More...
 
procedure, public is_same => is_same_
 See interface is_same More...
 
procedure, public same => is_same_
 See interface is_same More...
 
procedure, public references => references_
 See interface references More...
 
procedure, public refs => references_
 See interface references More...
 
procedure, public print => print_
 See interface print More...
 
procedure, public new => new_
 See interface new More...
 
procedure, public push => push_
 See interface push More...
 
procedure, public pop => pop_
 See interface pop More...
 
procedure, public keep => keep_
 See interface keep More...
 
procedure, public get_elem => get_elem_
 See interface get_elem More...
 
procedure, public get => get_elem_
 See interface get_elem More...
 
procedure, public get_elemp => get_elemp_
 See interface get_elemp More...
 
procedure, public getp => get_elemp_
 See interface get_elemp More...
 
procedure, public size => size_elem_
 See interface size More...
 
procedure, public size_max => size_max_elem_
 See interface size_max More...
 
subroutine new_ (this, nel)
 
subroutine new_ (this, nel)
 
subroutine push_ (this, item)
 
subroutine pop_ (this, item)
 
subroutine pop_delete_ (this, top, bot)
 
subroutine keep_ (this, top, bot)
 
subroutine get_elem_ (this, elem, iel)
 
subroutine get_elemp_ (this, p, iel)
 
elemental integer function size_elem_ (this)
 
elemental integer function size_max_elem_ (this)
 
subroutine print_ (this, info, indent)
 
subroutine assign_ (lhs, rhs)
 
subroutine initialize_ (this)
 
pure logical function is_initialized_ (this)
 
pure logical function is_initialized_ (this)
 
pure logical function is_initialized_ (this)
 
elemental logical function is_same_ (lhs, rhs)
 
elemental logical function is_same_ (lhs, rhs)
 
elemental subroutine delete_ (this)
 
elemental subroutine nullify_ (this)
 
elemental integer function references_ (this)
 
elemental integer function references_ (this)
 
subroutine initialize_ (this)
 
pure logical function is_initialized_ (this)
 
elemental logical function is_same_ (lhs, rhs)
 
elemental subroutine delete_ (this)
 
elemental subroutine nullify_ (this)
 
subroutine assign_ (lhs, rhs)
 
elemental integer function references_ (this)
 
subroutine new_ (this, nel)
 
subroutine push_ (this, item)
 
subroutine pop_ (this, item)
 
subroutine pop_delete_ (this, top, bot)
 
subroutine keep_ (this, top, bot)
 
subroutine get_elem_ (this, elem, iel)
 
subroutine get_elemp_ (this, p, iel)
 
elemental integer function size_elem_ (this)
 
elemental integer function size_max_elem_ (this)
 
subroutine print_ (this, info, indent)
 

Variables

character(len=*), parameter, private bud_mod = "bud_" // "bud_FS_dArray1D"
 Name of module. More...
 
character(len=*), parameter, private bud_type = "FS_dArray1D"
 Name of bud in this module. More...
 
integer, parameter, public bud_fstack_all = 0
 Special parameter for popping all elements. More...
 

Function/Subroutine Documentation

subroutine assign_ ( class(fs_darray1d), intent(inout)  lhs,
class(fs_darray1d), intent(in)  rhs 
)
private
Parameters
[in,out]lhscontains rhs after exit
[in]rhscopy the containing element bud
subroutine bud_fs_darray1d::assign_ ( class(fs_darray1d), intent(inout)  lhs,
class(fs_darray1d), intent(in)  rhs 
)
private
Parameters
[in,out]lhscontains rhs after exit
[in]rhscopy the containing element bud
procedure, public delete ( )

See interface delete

elemental subroutine delete_ ( class(fs_darray1d), intent(inout)  this)
private
Parameters
[in,out]thisreturned bud is un-initialized with no data associated
elemental subroutine bud_fs_darray1d::delete_ ( class(fs_darray1d), intent(inout)  this)
private
Parameters
[in,out]thisreturned bud is un-initialized with no data associated

Here is the call graph for this function:

procedure, public get ( )

See interface get_elem

procedure, public get_elem ( )

See interface get_elem

subroutine get_elem_ ( class(fs_darray1d), intent(in)  this,
type(darray1d), intent(inout)  elem,
integer, intent(in), optional  iel 
)
private
Parameters
[in]thisstack to retrieve element from
[in,out]elemreturned item stored in element iel
[in]ieloptional=size(this) index of element to return. May be negative to offset from the top
subroutine bud_fs_darray1d::get_elem_ ( class(fs_darray1d), intent(in)  this,
type(darray1d), intent(inout)  elem,
integer, intent(in), optional  iel 
)
private
Parameters
[in]thisstack to retrieve element from
[in,out]elemreturned item stored in element iel
[in]ieloptional=size(this) index of element to return. May be negative to offset from the top
procedure, public get_elemp ( )

See interface get_elemp

subroutine get_elemp_ ( class(fs_darray1d), intent(in)  this,
type(darray1d), pointer  p,
integer, intent(in), optional  iel 
)
private
Parameters
[in]thisstack to retrieve pointer element from
ppointer to the element iel
[in]ieloptional=size(this) index of element to return. May be negative to offset from top.
subroutine bud_fs_darray1d::get_elemp_ ( class(fs_darray1d), intent(in)  this,
type(darray1d), pointer  p,
integer, intent(in), optional  iel 
)
private
Parameters
[in]thisstack to retrieve pointer element from
ppointer to the element iel
[in]ieloptional=size(this) index of element to return. May be negative to offset from top.
procedure, public getp ( )

See interface get_elemp

procedure, public initialize ( )

See interface initialize

subroutine initialize_ ( class(fs_darray1d), intent(inout)  this)
private
Parameters
[in,out]thisbud that is initialized
subroutine bud_fs_darray1d::initialize_ ( class(fs_darray1d), intent(inout)  this)
private
Parameters
[in,out]thisbud that is initialized
procedure, public initialized ( )

See interface is_initialized

procedure, public is_initd ( )

See interface is_initialized

procedure, public is_initialized ( )

See interface is_initialized

pure logical function is_initialized_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in]thischeck if this bud is initialized
Returns
.true. if it is associated, else .false.
pure logical function is_initialized_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in]thischeck if this bud is initialized
Returns
.true. if it is associated, else .false.
pure logical function is_initialized_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in]thischeck if this bud is initialized
Returns
.true. if it is associated, else .false.
pure logical function bud_fs_darray1d::is_initialized_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in]thischeck if this bud is initialized
Returns
.true. if it is associated, else .false.
procedure, public is_same ( )

See interface is_same

elemental logical function is_same_ ( class(fs_darray1d), intent(in)  lhs,
class(fs_darray1d), intent(in)  rhs 
)
private
Parameters
[in]lhsfirst bud
[in]rhssecond bud
Returns
.true. if lhs and rhs point to the same data
elemental logical function is_same_ ( class(fs_darray1d), intent(in)  lhs,
class(fs_darray1d), intent(in)  rhs 
)
private
Parameters
[in]lhsfirst bud
[in]rhssecond bud
Returns
.true. if lhs and rhs point to the same data
elemental logical function bud_fs_darray1d::is_same_ ( class(fs_darray1d), intent(in)  lhs,
class(fs_darray1d), intent(in)  rhs 
)
private
Parameters
[in]lhsfirst bud
[in]rhssecond bud
Returns
.true. if lhs and rhs point to the same data
procedure, public keep ( )

See interface keep

subroutine keep_ ( class(fs_darray1d), intent(inout)  this,
integer, intent(in), optional  top,
integer, intent(in), optional  bot 
)
private
Parameters
[in,out]thisstack to operate on
[in]topoptional=1 number of elements kept from the top
[in]botoptional=__null__ number of elements kept from the bottom, only used if top is not supplied.
subroutine bud_fs_darray1d::keep_ ( class(fs_darray1d), intent(inout)  this,
integer, intent(in), optional  top,
integer, intent(in), optional  bot 
)
private
Parameters
[in,out]thisstack to operate on
[in]topoptional=1 number of elements kept from the top
[in]botoptional=__null__ number of elements kept from the bottom, only used if top is not supplied.
procedure, public new ( )

See interface new

subroutine new_ ( class(fs_darray1d), intent(inout)  this,
integer, intent(in)  nel 
)
private
Parameters
[in,out]thisinitialize the finite stack
[in]nelmaximum number of elements that may be contained in the stack
subroutine new_ ( class(fs_darray1d), intent(inout)  this,
integer, intent(in)  nel 
)
private
Parameters
[in,out]thisinitialize the finite stack
[in]nelmaximum number of elements that may be contained in the stack
subroutine bud_fs_darray1d::new_ ( class(fs_darray1d), intent(inout)  this,
integer, intent(in)  nel 
)
private
Parameters
[in,out]thisinitialize the finite stack
[in]nelmaximum number of elements that may be contained in the stack
procedure, public nullify ( )

See interface nullify

elemental subroutine nullify_ ( class(fs_darray1d), intent(inout)  this)
private
Parameters
[in,out]thisnullify references from this bud
elemental subroutine bud_fs_darray1d::nullify_ ( class(fs_darray1d), intent(inout)  this)
private
Parameters
[in,out]thisnullify references from this bud
procedure, public pop ( )

See interface pop

subroutine bud_fs_darray1d::pop_ ( class(fs_darray1d), intent(inout)  this,
type(darray1d), intent(inout)  item 
)
private
Parameters
[in,out]thisstack that gets removed an item
[in,out]itemreturned element from the top of the stack
subroutine pop_ ( class(fs_darray1d), intent(inout)  this,
type(darray1d), intent(inout)  item 
)
private
Parameters
[in,out]thisstack that gets removed an item
[in,out]itemreturned element from the top of the stack
subroutine pop_delete_ ( class(fs_darray1d), intent(inout)  this,
integer, intent(in), optional  top,
integer, intent(in), optional  bot 
)
private
Parameters
[in,out]thisstack that gets removed an item
[in]topoptional=1 number of popped elements from top. If BUD_FSTACK_ALL is supplied it will clear all elements.
[in]botoptional=__null__ has precedence if top not supplied. Pops bot elements from the bottom of the stack.
subroutine bud_fs_darray1d::pop_delete_ ( class(fs_darray1d), intent(inout)  this,
integer, intent(in), optional  top,
integer, intent(in), optional  bot 
)
private
Parameters
[in,out]thisstack that gets removed an item
[in]topoptional=1 number of popped elements from top. If BUD_FSTACK_ALL is supplied it will clear all elements.
[in]botoptional=__null__ has precedence if top not supplied. Pops bot elements from the bottom of the stack.
procedure, public print ( )

See interface print

subroutine print_ ( class(fs_darray1d), intent(in)  this,
character(len=*), intent(in), optional  info,
integer, intent(in), optional  indent 
)
private
Parameters
[in]thisdata type
[in]infooptional="FS_dArray1D" additional information printed
[in]indentoptional=1 possible indentation of printed statement
subroutine bud_fs_darray1d::print_ ( class(fs_darray1d), intent(in)  this,
character(len=*), intent(in), optional  info,
integer, intent(in), optional  indent 
)
private
Parameters
[in]thisdata type
[in]infooptional="FS_dArray1D" additional information printed
[in]indentoptional=1 possible indentation of printed statement
procedure, public push ( )

See interface push

subroutine bud_fs_darray1d::push_ ( class(fs_darray1d), intent(inout)  this,
type(darray1d), intent(in)  item 
)
private
Parameters
[in,out]thisstack that gets added an element
[in]itemelement added to the stack
subroutine push_ ( class(fs_darray1d), intent(inout)  this,
type(darray1d), intent(in)  item 
)
private
Parameters
[in,out]thisstack that gets added an element
[in]itemelement added to the stack
procedure, public references ( )

See interface references

elemental integer function references_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in]thisreference counted bud
Returns
number of times this has been referenced
elemental integer function references_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in]thisreference counted bud
Returns
number of times this has been referenced
elemental integer function bud_fs_darray1d::references_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in]thisreference counted bud
Returns
number of times this has been referenced
procedure, public refs ( )

See interface references

procedure, public same ( )

See interface is_same

procedure, public size ( )

See interface size

elemental integer function size_elem_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in,out]thisstack to count element from
Returns
number of currently stored elements
elemental integer function bud_fs_darray1d::size_elem_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in,out]thisstack to count element from
Returns
number of currently stored elements
procedure, public size_max ( )

See interface size_max

elemental integer function size_max_elem_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in,out]thisstack that is queried maximum size of
Returns
maximum number of allowed elements
elemental integer function bud_fs_darray1d::size_max_elem_ ( class(fs_darray1d), intent(in)  this)
private
Parameters
[in,out]thisstack that is queried maximum size of
Returns
maximum number of allowed elements

Variable Documentation

integer, parameter, public bud_fstack_all = 0

Special parameter for popping all elements.

Allows one to pop/delete all elements in the stack. This basically performs a

n = size_max(this)
call delete(this)
call new(this, n)
character(len=*), parameter, private bud_mod = "bud_" // "bud_FS_dArray1D"
private

Name of module.

character(len=*), parameter, private bud_type = "FS_dArray1D"
private

Name of bud in this module.