Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Functions

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_BTNODESCIPbtnodeGetParent (SCIP_BTNODE *node)
 
SCIP_BTNODESCIPbtnodeGetLeftchild (SCIP_BTNODE *node)
 
SCIP_BTNODESCIPbtnodeGetRightchild (SCIP_BTNODE *node)
 
SCIP_BTNODESCIPbtnodeGetSibling (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_BTNODESCIPbtGetRoot (SCIP_BT *tree)
 
void SCIPbtSetRoot (SCIP_BT *tree, SCIP_BTNODE *root)
 

Function Documentation

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

Parameters
treebinary tree
nodepointer to store the created node
dataptruser node data pointer, or NULL

Definition at line 6639 of file misc.c.

References btnodeCreateEmpty(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by checkOverloadViaThetaTree(), and insertThetanode().

void SCIPbtnodeFree ( SCIP_BT tree,
SCIP_BTNODE **  node 
)

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.

frees the node including the rooted subtree

Note
The user pointer (object) is not freed. If needed, it has to be done by the user.
Parameters
treebinary tree
nodenode to be freed

Definition at line 6703 of file misc.c.

References btnodeFreeLeaf(), NULL, and SCIPbtnodeFree().

Referenced by deleteLambdaLeaf(), SCIPbtFree(), and SCIPbtnodeFree().

SCIP_BTNODE* SCIPbtnodeGetParent ( SCIP_BTNODE node)

returns the parent which can be NULL if the given node is the root

Parameters
nodenode

Definition at line 6758 of file misc.c.

References NULL, and SCIP_BtNode::parent.

Referenced by deleteLambdaLeaf(), insertThetanode(), SCIPbtnodeGetSibling(), SCIPbtnodeIsLeftchild(), SCIPbtnodeIsRightchild(), updateEnvelop(), and updateKeyOnTrace().

SCIP_BTNODE* SCIPbtnodeGetLeftchild ( SCIP_BTNODE node)
SCIP_BTNODE* SCIPbtnodeGetRightchild ( SCIP_BTNODE node)
SCIP_BTNODE* SCIPbtnodeGetSibling ( SCIP_BTNODE node)

returns the sibling of the node or NULL if does not exist

Parameters
nodenode

Definition at line 6788 of file misc.c.

References NULL, SCIPbtnodeGetLeftchild(), SCIPbtnodeGetParent(), and SCIPbtnodeGetRightchild().

SCIP_Bool SCIPbtnodeIsRoot ( SCIP_BTNODE node)

returns whether the node is a root node

Parameters
nodenode

Definition at line 6808 of file misc.c.

References NULL, and SCIP_BtNode::parent.

Referenced by deleteLambdaLeaf(), inferboundsEdgeFinding(), SCIPbtnodeIsLeftchild(), SCIPbtnodeIsRightchild(), and updateKeyOnTrace().

SCIP_Bool SCIPbtnodeIsLeftchild ( SCIP_BTNODE node)

returns TRUE if the given node is left child

Parameters
nodenode

Definition at line 6828 of file misc.c.

References FALSE, SCIPbtnodeGetLeftchild(), SCIPbtnodeGetParent(), SCIPbtnodeIsRoot(), and TRUE.

Referenced by deleteLambdaLeaf(), and updateKeyOnTrace().

SCIP_Bool SCIPbtnodeIsRightchild ( SCIP_BTNODE node)

returns TRUE if the given node is right child

Parameters
nodenode

Definition at line 6846 of file misc.c.

References FALSE, SCIPbtnodeGetParent(), SCIPbtnodeGetRightchild(), SCIPbtnodeIsRoot(), and TRUE.

Referenced by deleteLambdaLeaf().

void SCIPbtnodeSetData ( SCIP_BTNODE node,
void *  dataptr 
)

sets the give node data

Note
The old user pointer is not freed.
Parameters
nodenode
dataptrnode user data pointer

Definition at line 6867 of file misc.c.

References SCIP_BtNode::dataptr, and NULL.

void SCIPbtnodeSetParent ( SCIP_BTNODE node,
SCIP_BTNODE parent 
)

sets parent node

Note
The old parent including the rooted subtree is not delete.
Parameters
nodenode
parentnew parent node, or NULL

Definition at line 6881 of file misc.c.

References NULL, and SCIP_BtNode::parent.

Referenced by deleteLambdaLeaf(), and insertThetanode().

void SCIPbtnodeSetLeftchild ( SCIP_BTNODE node,
SCIP_BTNODE left 
)

sets left child

Note
The old left child including the rooted subtree is not delete.
Parameters
nodenode
leftnew left child, or NULL

Definition at line 6895 of file misc.c.

References SCIP_BtNode::left, and NULL.

Referenced by deleteLambdaLeaf(), and insertThetanode().

void SCIPbtnodeSetRightchild ( SCIP_BTNODE node,
SCIP_BTNODE right 
)

sets right child

Note
The old right child including the rooted subtree is not delete.
Parameters
nodenode
rightnew right child, or NULL

Definition at line 6909 of file misc.c.

References NULL, and SCIP_BtNode::right.

Referenced by deleteLambdaLeaf(), and insertThetanode().

SCIP_RETCODE SCIPbtCreate ( SCIP_BT **  tree,
BMS_BLKMEM blkmem 
)

creates an binary tree

Parameters
treepointer to store the created binary tree
blkmemblock memory used to createnode

Definition at line 6920 of file misc.c.

References BMSallocMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by checkOverloadViaThetaTree().

void SCIPbtFree ( SCIP_BT **  tree)

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.

frees binary tree

Note
The user pointers (object) of the nodes are not freed. If needed, it has to be done by the user.
Parameters
treepointer to binary tree

Definition at line 6939 of file misc.c.

References BMSfreeMemory, NULL, and SCIPbtnodeFree().

Referenced by checkOverloadViaThetaTree().

void SCIPbtPrintGml ( SCIP_BT tree,
FILE *  file 
)

prints the binary tree in GML format into the given file

Parameters
treebinary tree
filefile to write to

Definition at line 6991 of file misc.c.

References btPrintSubtree(), NULL, SCIPbtGetRoot(), SCIPbtIsEmpty(), SCIPgmlWriteClosing(), SCIPgmlWriteOpening(), and TRUE.

SCIP_Bool SCIPbtIsEmpty ( SCIP_BT tree)

returns whether the binary tree is empty (has no nodes)

Parameters
treebinary tree

Definition at line 7021 of file misc.c.

References NULL, and SCIP_Bt::root.

Referenced by checkOverloadViaThetaTree(), inferboundsEdgeFinding(), insertThetanode(), and SCIPbtPrintGml().

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

Parameters
treetree to be evaluated

Definition at line 7031 of file misc.c.

References NULL, and SCIP_Bt::root.

Referenced by checkOverloadViaThetaTree(), inferboundsEdgeFinding(), insertThetanode(), and SCIPbtPrintGml().

void SCIPbtSetRoot ( SCIP_BT tree,
SCIP_BTNODE root 
)

sets root node

Note
The old root including the rooted subtree is not delete.
Parameters
treetree to be evaluated
rootnew root, or NULL

Definition at line 7044 of file misc.c.

References NULL, and SCIP_Bt::root.

Referenced by deleteLambdaLeaf(), and insertThetanode().