OpenCMISS-Iron Internal API Documentation
trees.f90 File Reference

Implements trees of base types. More...

Go to the source code of this file.

Data Types

type  trees::tree_node_type
 
type  trees::tree_type
 
interface  trees::tree_createfinish
 
interface  trees::tree_createstart
 
interface  trees::tree_detachanddestroy
 
interface  trees::tree_inserttypeset
 
interface  trees::tree_itemdelete
 
interface  trees::tree_iteminsert
 
interface  trees::tree_nodekeyget
 
interface  trees::tree_nodevalueget
 
interface  trees::tree_nodevalueset
 

Modules

module  trees
 Implements trees of base types.
 

Functions/Subroutines

subroutine, public trees::tree_create_finish (TREE, ERR, ERROR,)
 Finishes the creation of a tree created with TREE_CREATE_START. More...
 
subroutine, public trees::tree_create_start (TREE, ERR, ERROR,)
 Starts the creation of a tree and returns a pointer to the created tree. More...
 
subroutine, public trees::tree_destroy (TREE, ERR, ERROR,)
 Destroys a tree. More...
 
subroutine, public trees::tree_detach (TREE, NUMBER_IN_TREE, TREE_VALUES, ERR, ERROR,)
 Detaches the tree values and returns them as a pointer to the an array. More...
 
subroutine, public trees::tree_detach_and_destroy (TREE, NUMBER_IN_TREE, TREE_VALUES, ERR, ERROR,)
 Detaches the tree values and returns them as a pointer to the an array and then destroys the tree. More...
 
recursive subroutine trees::tree_detach_in_order (TREE, X, COUNT, TREE_VALUES, ERR, ERROR,)
 Detaches the tree values in order from the specified tree node and adds them to the tree values array. More...
 
subroutine trees::tree_finalise (TREE, ERR, ERROR,)
 Finalises a tree and deallocates all memory. More...
 
subroutine trees::tree_initialise (TREE, ERR, ERROR,)
 Initialises a tree. More...
 
subroutine, public trees::tree_insert_type_set (TREE, INSERT_TYPE, ERR, ERROR,)
 Sets/changes the insert type for a tree. More...
 
subroutine, public trees::tree_item_delete (TREE, KEY, ERR, ERROR,)
 Deletes a tree node specified by a key from a tree. More...
 
subroutine, public trees::tree_item_insert (TREE, KEY, VALUE, INSERT_STATUS, ERR, ERROR,)
 Inserts a tree node into a red-black tree. More...
 
recursive subroutine trees::tree_node_finalise (TREE, TREE_NODE, ERR, ERROR,)
 Finalises a tree node and deallocates all memory. More...
 
subroutine trees::tree_node_initialise (TREE, TREE_NODE, ERR, ERROR,)
 Initialises a tree node. More...
 
subroutine, public trees::tree_node_key_get (TREE, TREE_NODE, KEY, ERR, ERROR,)
 Gets the key at a specified tree node. More...
 
subroutine, public trees::tree_node_value_get (TREE, TREE_NODE, VALUE, ERR, ERROR,)
 Gets the value at a specified tree node. More...
 
subroutine, public trees::tree_node_value_set (TREE, TREE_NODE, VALUE, ERR, ERROR,)
 Sets the value at a specified tree node. More...
 
subroutine, public trees::tree_output (ID, TREE, ERR, ERROR,)
 Outputs a tree to the specified output stream ID. More...
 
recursive subroutine trees::tree_output_in_order (ID, TREE, X, ERR, ERROR,)
 Outputs a tree in order to the specified output stream ID from the specified tree node. More...
 
type(tree_node_type) function, pointer trees::tree_predecessor (TREE, X, ERR, ERROR)
 Returns the predeccessor of a tree at a specified tree node. More...
 
subroutine, public trees::tree_search (TREE, KEY, X, ERR, ERROR,)
 Searches a tree to see if it contains a key. More...
 
type(tree_node_type) function, pointer trees::tree_successor (TREE, X, ERR, ERROR)
 Returns the successor of a tree at a specified tree node. More...
 

Variables

integer(intg), parameter trees::tree_black_node =0
 The black colour type for a tree node. More...
 
integer(intg), parameter trees::tree_red_node =1
 The red colour type for a tree node. More...
 
integer(intg), parameter, public trees::tree_node_insert_sucessful =1
 Successful insert status. More...
 
integer(intg), parameter, public trees::tree_node_duplicate_key =2
 Duplicate key found for those trees that do not allow duplicate keys. More...
 
integer(intg), parameter, public trees::tree_duplicates_allowed_type =1
 Duplicate keys allowed tree type. More...
 
integer(intg), parameter, public trees::tree_no_duplicates_allowed =2
 No duplicate keys allowed tree type. More...
 

Detailed Description

Implements trees of base types.

Author
Chris Bradley

LICENSE

Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is OpenCMISS

The Initial Developer of the Original Code is University of Auckland, Auckland, New Zealand, the University of Oxford, Oxford, United Kingdom and King's College, London, United Kingdom. Portions created by the University of Auckland, the University of Oxford and King's College, London are Copyright (C) 2007-2010 by the University of Auckland, the University of Oxford and King's College, London. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.

Definition in file trees.f90.