|
|
|
| SCIP_RETCODE | SCIPbtnodeCreate (SCIP_BT *tree, SCIP_BTNODE **node, void *dataptr) |
| |
| void | SCIPbtnodeFree (SCIP_BT *tree, SCIP_BTNODE **node) |
| |
| void * | SCIPbtnodeGetData (SCIP_BTNODE *node) |
| |
| SCIP_BTNODE * | SCIPbtnodeGetParent (SCIP_BTNODE *node) |
| |
| SCIP_BTNODE * | SCIPbtnodeGetLeftchild (SCIP_BTNODE *node) |
| |
| SCIP_BTNODE * | SCIPbtnodeGetRightchild (SCIP_BTNODE *node) |
| |
| SCIP_BTNODE * | SCIPbtnodeGetSibling (SCIP_BTNODE *node) |
| |
| SCIP_Bool | SCIPbtnodeIsRoot (SCIP_BTNODE *node) |
| |
| SCIP_Bool | SCIPbtnodeIsLeaf (SCIP_BTNODE *node) |
| |
| SCIP_Bool | SCIPbtnodeIsLeftchild (SCIP_BTNODE *node) |
| |
| SCIP_Bool | SCIPbtnodeIsRightchild (SCIP_BTNODE *node) |
| |
| void | SCIPbtnodeSetData (SCIP_BTNODE *node, void *dataptr) |
| |
| void | SCIPbtnodeSetParent (SCIP_BTNODE *node, SCIP_BTNODE *parent) |
| |
| void | SCIPbtnodeSetLeftchild (SCIP_BTNODE *node, SCIP_BTNODE *left) |
| |
| void | SCIPbtnodeSetRightchild (SCIP_BTNODE *node, SCIP_BTNODE *right) |
| |
| SCIP_RETCODE | SCIPbtCreate (SCIP_BT **tree, BMS_BLKMEM *blkmem) |
| |
| void | SCIPbtFree (SCIP_BT **tree) |
| |
| void | SCIPbtPrintGml (SCIP_BT *tree, FILE *file) |
| |
| SCIP_Bool | SCIPbtIsEmpty (SCIP_BT *tree) |
| |
| SCIP_BTNODE * | SCIPbtGetRoot (SCIP_BT *tree) |
| |
| void | SCIPbtSetRoot (SCIP_BT *tree, SCIP_BTNODE *root) |
| |
creates a binary tree node with sorting value and user data
- Parameters
-
| tree | binary search tree |
| node | pointer to store the created search node |
| dataptr | user node data pointer, or NULL |
frees the binary node including the rooted subtree
- Note
- The user pointer (object) is not freed. If needed, it has to be done by the user.
- Parameters
-
| tree | binary tree |
| node | node to be freed |
returns the user data pointer stored in that node
- Parameters
-
returns the parent which can be NULL if the given node is the root
- Parameters
-
returns left child which can be NULL if the given node is a leaf
- Parameters
-
returns right child which can be NULL if the given node is a leaf
- Parameters
-
returns the sibling of the node or NULL if does not exist
- Parameters
-
returns whether the node is a root node
- Parameters
-
returns whether the node is a leaf
- Parameters
-
returns TRUE if the given node is left child
- Parameters
-
returns TRUE if the given node is right child
- Parameters
-
| void SCIPbtnodeSetData |
( |
SCIP_BTNODE * |
node, |
|
|
void * |
dataptr |
|
) |
| |
sets the give node data
- Note
- The old user pointer is not freed.
- Parameters
-
| node | node |
| dataptr | node user data pointer |
sets parent node
- Note
- The old parent including the rooted subtree is not delete.
- Parameters
-
| node | node |
| parent | new parent node, or NULL |
sets left child
- Note
- The old left child including the rooted subtree is not delete.
- Parameters
-
| node | node |
| left | new left child, or NULL |
sets right child
- Note
- The old right child including the rooted subtree is not delete.
- Parameters
-
| node | node |
| right | new right child, or NULL |
creates an binary tree
- Parameters
-
| tree | pointer to store the created binary tree |
| blkmem | block memory used to create nodes |
frees binary tree
- Note
- The user pointers (object) of the search nodes are not freed. If needed, it has to be done by the user.
- Parameters
-
| tree | pointer to binary tree |
| void SCIPbtPrintGml |
( |
SCIP_BT * |
tree, |
|
|
FILE * |
file |
|
) |
| |
prints the binary tree in GML format into the given file
- Parameters
-
| tree | binary tree |
| file | file to write to |
returns whether the binary tree is empty (has no nodes)
- Parameters
-
returns the root node of the binary tree or NULL if the binary tree is empty
- Parameters
-
sets root node
- Note
- The old root including the rooted subtree is not delete.
- Parameters
-
| tree | tree to be evaluated |
| root | new root, or NULL |
|