node_t Derived Type

type, private :: node_t


Inherits

type~~node_t~~InheritsGraph type~node_t node_t type~aabb_t aabb_t type~node_t->type~aabb_t aabb

Inherited by

type~~node_t~~InheritedByGraph type~node_t node_t type~aabbtree_t aabbtree_t type~aabbtree_t->type~node_t nodes

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
integer, public :: next =NULL_NODE
integer, public :: parent =NULL_NODE
integer, public :: left =NULL_NODE
integer, public :: right =NULL_NODE
integer, public :: height =-1
integer, public :: atom =0
type(aabb_t), public :: aabb

Type-Bound Procedures

procedure, public :: init => node_init

  • interface

    private module subroutine node_init(this)

    Initializes a node.

    Arguments

    Type IntentOptional AttributesName
    class(node_t), intent(out) :: this

    A node_t instance.

procedure, public :: isleaf => node_isleaf

  • interface

    private module function node_isleaf(this) result(res)

    Is this a leaf node?

    Arguments

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

    A node_t instance.

    Return Value logical

    true if this is a leaf node, false otherwise.

procedure, public :: asstr => node_asstr

  • interface

    private module function node_asstr(this, frmt) result(buf)

    Returns a string representation of a node.

    Arguments

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

    A node_t instance.

    character(len=*), intent(in), optional :: frmt

    Format string for real numbers, e.g. '(f15.6)'. Default: (g0.6).

    Return Value character(len=:), allocatable

    Return value

Source Code

type node_t
    integer :: next = NULL_NODE
    integer :: parent = NULL_NODE
    integer :: left = NULL_NODE
    integer :: right = NULL_NODE
    integer :: height = -1
    integer :: atom = 0
    type(aabb_t) :: aabb
    contains
        procedure :: init => node_init
        procedure :: isleaf => node_isleaf
        procedure :: asstr => node_asstr
end type node_t