btree_new_node_i8_dp2d Subroutine

private subroutine btree_new_node_i8_dp2d(tree, node)

Arguments

Type IntentOptional Attributes Name
type(btree_i8_dp2d), intent(inout) :: tree
type(btree_node_i8_dp2d), POINTER :: node

Source Code

      SUBROUTINE btree_new_node_i8_dp2d (tree, node)
         TYPE(btree_i8_dp2d), INTENT(INOUT) :: tree
         TYPE(btree_node_i8_dp2d), POINTER :: node
         INTEGER :: i
         !
         ALLOCATE (node)
         ALLOCATE (node%keys(tree%b%max_fill))
         ALLOCATE (node%values(tree%b%max_fill))
         ALLOCATE (node%subtrees(tree%b%max_fill + 1))
         DO i = 1, tree%b%max_fill + 1
            NULLIFY (node%subtrees(i)%node)
         END DO
         node%filled = 0
         NULLIFY (node%parent)
         tree%b%lastid = tree%b%lastid + 1
         node%id = tree%b%lastid
      END SUBROUTINE btree_new_node_i8_dp2d