binary search tree data structure
SCIP_RETCODE SCIPbtnodeCreate | ( | SCIP_BT * | tree, |
SCIP_BTNODE ** | node, | ||
void * | dataptr | ||
) |
creates a binary tree node with sorting value and user data
creates a tree node with (optinal) user data
tree | binary tree |
node | pointer to store the created node |
dataptr | user node data pointer, or NULL |
Definition at line 8004 of file misc.c.
References btnodeCreateEmpty(), SCIP_CALL, and SCIP_OKAY.
Referenced by checkOverloadViaThetaTree(), insertThetanode(), and SCIPrealHashCode().
void SCIPbtnodeFree | ( | SCIP_BT * | tree, |
SCIP_BTNODE ** | node | ||
) |
frees the binary node including the rooted subtree
frees the node including the rooted subtree
tree | binary tree |
node | node to be freed |
Definition at line 8068 of file misc.c.
References btnodeFreeLeaf(), and SCIPbtnodeFree().
Referenced by deleteLambdaLeaf(), SCIPbtFree(), SCIPbtnodeFree(), and SCIPrealHashCode().
void* SCIPbtnodeGetData | ( | SCIP_BTNODE * | node | ) |
returns the user data pointer stored in that node
node | node |
Definition at line 8113 of file misc.c.
References SCIP_BtNode::dataptr.
Referenced by analyzeConflictOverload(), checkOverloadViaThetaTree(), collectThetaSubtree(), computeEnergyContribution(), deleteLambdaLeaf(), findResponsibleLambdaLeafTraceEnergy(), findResponsibleLambdaLeafTraceEnvelop(), inferboundsEdgeFinding(), insertThetanode(), moveNodeToLambda(), SCIP_DECL_SORTPTRCOMP(), SCIPrealHashCode(), traceLambdaEnergy(), traceLambdaEnvelop(), traceThetaEnvelop(), updateEnvelop(), and updateKeyOnTrace().
SCIP_BTNODE* SCIPbtnodeGetParent | ( | SCIP_BTNODE * | node | ) |
returns the parent which can be NULL if the given node is the root
node | node |
Definition at line 8123 of file misc.c.
References SCIP_BtNode::parent.
Referenced by deleteLambdaLeaf(), insertThetanode(), SCIPbtnodeGetSibling(), SCIPbtnodeIsLeftchild(), SCIPbtnodeIsRightchild(), SCIPrealHashCode(), updateEnvelop(), and updateKeyOnTrace().
SCIP_BTNODE* SCIPbtnodeGetLeftchild | ( | SCIP_BTNODE * | node | ) |
returns left child which can be NULL if the given node is a leaf
node | node |
Definition at line 8133 of file misc.c.
References SCIP_BtNode::left.
Referenced by btPrintSubtree(), collectThetaSubtree(), deleteLambdaLeaf(), findResponsibleLambdaLeafTraceEnergy(), findResponsibleLambdaLeafTraceEnvelop(), insertThetanode(), SCIPbtnodeGetSibling(), SCIPbtnodeIsLeftchild(), SCIPrealHashCode(), traceLambdaEnergy(), traceLambdaEnvelop(), traceThetaEnvelop(), and updateEnvelop().
SCIP_BTNODE* SCIPbtnodeGetRightchild | ( | SCIP_BTNODE * | node | ) |
returns right child which can be NULL if the given node is a leaf
node | node |
Definition at line 8143 of file misc.c.
References SCIP_BtNode::right.
Referenced by btPrintSubtree(), collectThetaSubtree(), deleteLambdaLeaf(), findResponsibleLambdaLeafTraceEnergy(), findResponsibleLambdaLeafTraceEnvelop(), insertThetanode(), SCIPbtnodeGetSibling(), SCIPbtnodeIsRightchild(), SCIPrealHashCode(), traceLambdaEnergy(), traceLambdaEnvelop(), traceThetaEnvelop(), and updateEnvelop().
SCIP_BTNODE* SCIPbtnodeGetSibling | ( | SCIP_BTNODE * | node | ) |
returns the sibling of the node or NULL if does not exist
node | node |
Definition at line 8153 of file misc.c.
References SCIPbtnodeGetLeftchild(), SCIPbtnodeGetParent(), and SCIPbtnodeGetRightchild().
Referenced by SCIPrealHashCode().
SCIP_Bool SCIPbtnodeIsRoot | ( | SCIP_BTNODE * | node | ) |
returns whether the node is a root node
node | node |
Definition at line 8173 of file misc.c.
References SCIP_BtNode::parent.
Referenced by deleteLambdaLeaf(), inferboundsEdgeFinding(), SCIPbtnodeIsLeftchild(), SCIPbtnodeIsRightchild(), SCIPrealHashCode(), and updateKeyOnTrace().
SCIP_Bool SCIPbtnodeIsLeaf | ( | SCIP_BTNODE * | node | ) |
returns whether the node is a leaf
node | node |
Definition at line 8183 of file misc.c.
References SCIP_BtNode::left, and SCIP_BtNode::right.
Referenced by collectThetaSubtree(), deleteLambdaLeaf(), findResponsibleLambdaLeafTraceEnergy(), findResponsibleLambdaLeafTraceEnvelop(), inferboundsEdgeFinding(), insertThetanode(), SCIPrealHashCode(), traceLambdaEnergy(), traceLambdaEnvelop(), traceThetaEnvelop(), and updateEnvelop().
SCIP_Bool SCIPbtnodeIsLeftchild | ( | SCIP_BTNODE * | node | ) |
returns TRUE if the given node is left child
node | node |
Definition at line 8193 of file misc.c.
References FALSE, SCIPbtnodeGetLeftchild(), SCIPbtnodeGetParent(), SCIPbtnodeIsRoot(), and TRUE.
Referenced by deleteLambdaLeaf(), SCIPrealHashCode(), and updateKeyOnTrace().
SCIP_Bool SCIPbtnodeIsRightchild | ( | SCIP_BTNODE * | node | ) |
returns TRUE if the given node is right child
node | node |
Definition at line 8211 of file misc.c.
References FALSE, SCIPbtnodeGetParent(), SCIPbtnodeGetRightchild(), SCIPbtnodeIsRoot(), and TRUE.
Referenced by deleteLambdaLeaf(), and SCIPrealHashCode().
void SCIPbtnodeSetData | ( | SCIP_BTNODE * | node, |
void * | dataptr | ||
) |
sets the give node data
node | node |
dataptr | node user data pointer |
Definition at line 8232 of file misc.c.
References SCIP_BtNode::dataptr.
Referenced by SCIPrealHashCode().
void SCIPbtnodeSetParent | ( | SCIP_BTNODE * | node, |
SCIP_BTNODE * | parent | ||
) |
sets parent node
node | node |
parent | new parent node, or NULL |
Definition at line 8246 of file misc.c.
References SCIP_BtNode::parent.
Referenced by deleteLambdaLeaf(), insertThetanode(), and SCIPrealHashCode().
void SCIPbtnodeSetLeftchild | ( | SCIP_BTNODE * | node, |
SCIP_BTNODE * | left | ||
) |
sets left child
node | node |
left | new left child, or NULL |
Definition at line 8260 of file misc.c.
References SCIP_BtNode::left.
Referenced by deleteLambdaLeaf(), insertThetanode(), and SCIPrealHashCode().
void SCIPbtnodeSetRightchild | ( | SCIP_BTNODE * | node, |
SCIP_BTNODE * | right | ||
) |
sets right child
node | node |
right | new right child, or NULL |
Definition at line 8274 of file misc.c.
References SCIP_BtNode::right.
Referenced by deleteLambdaLeaf(), insertThetanode(), and SCIPrealHashCode().
SCIP_RETCODE SCIPbtCreate | ( | SCIP_BT ** | tree, |
BMS_BLKMEM * | blkmem | ||
) |
creates an binary tree
tree | pointer to store the created binary tree |
blkmem | block memory used to createnode |
Definition at line 8285 of file misc.c.
References BMSallocBlockMemory, SCIP_ALLOC, and SCIP_OKAY.
Referenced by checkOverloadViaThetaTree(), and SCIPrealHashCode().
void SCIPbtFree | ( | SCIP_BT ** | tree | ) |
frees binary tree
frees binary tree
tree | pointer to binary tree |
Definition at line 8304 of file misc.c.
References BMSfreeBlockMemory, and SCIPbtnodeFree().
Referenced by checkOverloadViaThetaTree(), and SCIPrealHashCode().
void SCIPbtPrintGml | ( | SCIP_BT * | tree, |
FILE * | file | ||
) |
prints the binary tree in GML format into the given file
tree | binary tree |
file | file to write to |
Definition at line 8356 of file misc.c.
References btPrintSubtree(), nnodes, SCIPbtGetRoot(), SCIPbtIsEmpty(), SCIPgmlWriteClosing(), SCIPgmlWriteOpening(), and TRUE.
Referenced by SCIPrealHashCode().
returns whether the binary tree is empty (has no nodes)
tree | binary tree |
Definition at line 8386 of file misc.c.
References SCIP_Bt::root.
Referenced by checkOverloadViaThetaTree(), inferboundsEdgeFinding(), insertThetanode(), SCIPbtPrintGml(), and SCIPrealHashCode().
SCIP_BTNODE* SCIPbtGetRoot | ( | SCIP_BT * | tree | ) |
returns the root node of the binary tree or NULL if the binary tree is empty
returns the the root node of the binary or NULL if the binary tree is empty
tree | tree to be evaluated |
Definition at line 8396 of file misc.c.
References SCIP_Bt::root.
Referenced by checkOverloadViaThetaTree(), inferboundsEdgeFinding(), insertThetanode(), SCIPbtPrintGml(), and SCIPrealHashCode().
void SCIPbtSetRoot | ( | SCIP_BT * | tree, |
SCIP_BTNODE * | root | ||
) |
sets root node
tree | tree to be evaluated |
root | new root, or NULL |
Definition at line 8409 of file misc.c.
References SCIP_Bt::root.
Referenced by deleteLambdaLeaf(), insertThetanode(), and SCIPrealHashCode().