OpenCMISS-Iron Internal API Documentation
|
Implements trees of base types. More...
Data Types | |
interface | tree_createfinish |
interface | tree_createstart |
interface | tree_detachanddestroy |
interface | tree_inserttypeset |
interface | tree_itemdelete |
interface | tree_iteminsert |
type | tree_node_type |
interface | tree_nodekeyget |
interface | tree_nodevalueget |
interface | tree_nodevalueset |
type | tree_type |
Functions/Subroutines | |
subroutine, public | tree_create_finish (TREE, ERR, ERROR,) |
Finishes the creation of a tree created with TREE_CREATE_START. More... | |
subroutine, public | tree_create_start (TREE, ERR, ERROR,) |
Starts the creation of a tree and returns a pointer to the created tree. More... | |
subroutine, public | tree_destroy (TREE, ERR, ERROR,) |
Destroys a tree. More... | |
subroutine, public | 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 | 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 | 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 | tree_finalise (TREE, ERR, ERROR,) |
Finalises a tree and deallocates all memory. More... | |
subroutine | tree_initialise (TREE, ERR, ERROR,) |
Initialises a tree. More... | |
subroutine, public | tree_insert_type_set (TREE, INSERT_TYPE, ERR, ERROR,) |
Sets/changes the insert type for a tree. More... | |
subroutine, public | tree_item_delete (TREE, KEY, ERR, ERROR,) |
Deletes a tree node specified by a key from a tree. More... | |
subroutine, public | tree_item_insert (TREE, KEY, VALUE, INSERT_STATUS, ERR, ERROR,) |
Inserts a tree node into a red-black tree. More... | |
recursive subroutine | tree_node_finalise (TREE, TREE_NODE, ERR, ERROR,) |
Finalises a tree node and deallocates all memory. More... | |
subroutine | tree_node_initialise (TREE, TREE_NODE, ERR, ERROR,) |
Initialises a tree node. More... | |
subroutine, public | tree_node_key_get (TREE, TREE_NODE, KEY, ERR, ERROR,) |
Gets the key at a specified tree node. More... | |
subroutine, public | tree_node_value_get (TREE, TREE_NODE, VALUE, ERR, ERROR,) |
Gets the value at a specified tree node. More... | |
subroutine, public | tree_node_value_set (TREE, TREE_NODE, VALUE, ERR, ERROR,) |
Sets the value at a specified tree node. More... | |
subroutine, public | tree_output (ID, TREE, ERR, ERROR,) |
Outputs a tree to the specified output stream ID. More... | |
recursive subroutine | 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 | tree_predecessor (TREE, X, ERR, ERROR) |
Returns the predeccessor of a tree at a specified tree node. More... | |
subroutine, public | tree_search (TREE, KEY, X, ERR, ERROR,) |
Searches a tree to see if it contains a key. More... | |
type(tree_node_type) function, pointer | tree_successor (TREE, X, ERR, ERROR) |
Returns the successor of a tree at a specified tree node. More... | |
Variables | |
integer(intg), parameter | tree_black_node =0 |
The black colour type for a tree node. More... | |
integer(intg), parameter | tree_red_node =1 |
The red colour type for a tree node. More... | |
integer(intg), parameter, public | tree_node_insert_sucessful =1 |
Successful insert status. More... | |
integer(intg), parameter, public | tree_node_duplicate_key =2 |
Duplicate key found for those trees that do not allow duplicate keys. More... | |
integer(intg), parameter, public | tree_duplicates_allowed_type =1 |
Duplicate keys allowed tree type. More... | |
integer(intg), parameter, public | tree_no_duplicates_allowed =2 |
No duplicate keys allowed tree type. More... | |
Implements trees of base types.
subroutine, public trees::tree_create_finish | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Finishes the creation of a tree created with TREE_CREATE_START.
tree | A pointer to the tree to finish | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 190 of file trees.f90.
References base_routines::enters(), base_routines::exits(), tree_finalise(), and tree_node_initialise().
subroutine, public trees::tree_create_start | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Starts the creation of a tree and returns a pointer to the created tree.
tree | A pointer to the tree to create. Must not be associated on entry. | |
[out] | err | The error code. |
[out] | error | The error string. |
Definition at line 233 of file trees.f90.
References base_routines::enters(), base_routines::exits(), tree_duplicates_allowed_type, tree_finalise(), and tree_initialise().
subroutine, public trees::tree_destroy | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Destroys a tree.
tree | A pointer to the tree to destroy | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 265 of file trees.f90.
References base_routines::enters(), base_routines::exits(), and tree_finalise().
subroutine, public trees::tree_detach | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(out) | NUMBER_IN_TREE, | ||
integer(intg), dimension(:), pointer | TREE_VALUES, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Detaches the tree values and returns them as a pointer to the an array.
tree | A pointer to the tree to detach | |
[out] | number_in_tree | On exit, the number in the array that has been detached |
tree_values | On exit, a pointer to the dettached tree values. Must not be associated on entry. | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 292 of file trees.f90.
References base_routines::enters(), base_routines::exits(), and tree_detach_in_order().
subroutine, public trees::tree_detach_and_destroy | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(out) | NUMBER_IN_TREE, | ||
integer(intg), dimension(:), pointer | TREE_VALUES, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Detaches the tree values and returns them as a pointer to the an array and then destroys the tree.
tree | A pointer to the tree to detach and destroy | |
[out] | number_in_tree | On exit, the number in the array that has been detached |
tree_values | On exit, a pointer to the dettached tree values. Must not be associated on entry. | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 335 of file trees.f90.
References base_routines::enters(), base_routines::exits(), tree_detach_in_order(), and tree_finalise().
|
private |
Detaches the tree values in order from the specified tree node and adds them to the tree values array.
tree | A pointer to the tree to detach | |
x | A pointer to the specified tree node to detach from | |
[in,out] | count | The current number in the detached tree values array |
[in,out] | tree_values | The current detached tree values array |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 379 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by tree_detach(), and tree_detach_and_destroy().
|
private |
Finalises a tree and deallocates all memory.
tree | A pointer to the tree to finalise | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 422 of file trees.f90.
References base_routines::enters(), base_routines::exits(), and tree_node_finalise().
Referenced by tree_create_finish(), tree_create_start(), tree_destroy(), and tree_detach_and_destroy().
|
private |
Initialises a tree.
tree | A pointer to the tree to initialise | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 449 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by tree_create_start().
subroutine, public trees::tree_insert_type_set | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(in) | INSERT_TYPE, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Sets/changes the insert type for a tree.
tree | A pointer to the tree | |
[in] | insert_type | The insert type to set |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 480 of file trees.f90.
References base_routines::enters(), base_routines::exits(), tree_duplicates_allowed_type, and tree_no_duplicates_allowed.
subroutine, public trees::tree_item_delete | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(in) | KEY, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Deletes a tree node specified by a key from a tree.
tree | A pointer to the Red-Black tree to delete from | |
[in] | key | A pointer to the tree node to delete |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 521 of file trees.f90.
References base_routines::enters(), base_routines::exits(), tree_black_node, tree_red_node, and tree_successor().
subroutine, public trees::tree_item_insert | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(in) | KEY, | ||
integer(intg), intent(in) | VALUE, | ||
integer(intg), intent(out) | INSERT_STATUS, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Inserts a tree node into a red-black tree.
tree | A pointer to the Red-Black tree to insert into | |
[in] | key | The key to insert |
[in] | value | The value to insert |
[out] | insert_status | On exit, the status of the insert |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 769 of file trees.f90.
References base_routines::enters(), base_routines::exits(), tree_black_node, tree_no_duplicates_allowed, tree_node_duplicate_key, tree_node_initialise(), tree_node_insert_sucessful, and tree_red_node.
Referenced by data_projection_routines::data_projection_create_start_data_points().
|
private |
Finalises a tree node and deallocates all memory.
tree | A pointer to the tree containing the tree node to finalise | |
tree_node | A pointer to the tree node to finalise | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 953 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by tree_finalise().
|
private |
Initialises a tree node.
tree | A pointer to the tree containing the tree node to initialise | |
tree_node | A pointer to the tree node to initialise | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 985 of file trees.f90.
References base_routines::enters(), base_routines::exits(), and tree_black_node.
Referenced by tree_create_finish(), and tree_item_insert().
subroutine, public trees::tree_node_key_get | ( | type(tree_type), pointer | TREE, |
type(tree_node_type), pointer | TREE_NODE, | ||
integer(intg), intent(out) | KEY, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Gets the key at a specified tree node.
tree | A pointer to the tree containing the tree node | |
tree_node | A pointer to the tree node to get the key of | |
[out] | key | On exit, the key of the specified tree node |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1022 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
subroutine, public trees::tree_node_value_get | ( | type(tree_type), pointer | TREE, |
type(tree_node_type), pointer | TREE_NODE, | ||
integer(intg), intent(out) | VALUE, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Gets the value at a specified tree node.
tree | A pointer to the tree containing the tree node | |
tree_node | A pointer to the tree node to get the value of | |
[out] | value | On exit, the value of the specified tree node |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1059 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by data_projection_routines::dataprojection_datapointcheckexist(), and data_projection_routines::dataprojection_datapointglobalnumberget().
subroutine, public trees::tree_node_value_set | ( | type(tree_type), pointer | TREE, |
type(tree_node_type), pointer | TREE_NODE, | ||
integer(intg), intent(in) | VALUE, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Sets the value at a specified tree node.
tree | A pointer to the tree containing the tree node | |
tree_node | A pointer to the tree node to set the value of | |
[in] | value | The value of the specified tree node to set |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1096 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
subroutine, public trees::tree_output | ( | integer(intg), intent(in) | ID, |
type(tree_type), pointer | TREE, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Outputs a tree to the specified output stream ID.
[in] | id | The ID of the output stream |
tree | A pointer to the tree to search | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1133 of file trees.f90.
References base_routines::enters(), base_routines::exits(), and tree_output_in_order().
|
private |
Outputs a tree in order to the specified output stream ID from the specified tree node.
[in] | id | The ID of the output stream |
tree | A pointer to the tree to search | |
x | A pointer to the tree node to output from | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1168 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by tree_output().
|
private |
Returns the predeccessor of a tree at a specified tree node.
tree | A pointer to the Red-Black tree to find the predecessor of | |
x | A pointer to the tree node to return the predecessor of | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1222 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
subroutine, public trees::tree_search | ( | type(tree_type), pointer | TREE, |
integer(intg), intent(in) | KEY, | ||
type(tree_node_type), pointer | X, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Searches a tree to see if it contains a key.
tree | A pointer to the tree to search | |
[in] | key | The key to search for |
x | On return a pointer to the tree node containing the key. If the key does not exist NULL is returned | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1277 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by data_projection_routines::dataprojection_datapointcheckexist(), and data_projection_routines::dataprojection_datapointglobalnumberget().
|
private |
Returns the successor of a tree at a specified tree node.
tree | A pointer to the Red-Black tree to find the successor of | |
x | A pointer to the tree node to return the successor of | |
[out] | err | The error code |
[out] | error | The error string. |
Definition at line 1333 of file trees.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by tree_item_delete().