cudd  3.0.0
The University of Colorado Decision Diagram Package
Functions
mtrBasic.c File Reference

Basic manipulation of multiway branching trees. More...

#include "util.h"
#include "mtrInt.h"
Include dependency graph for mtrBasic.c:

Functions

MtrNodeMtr_AllocNode (void)
 Allocates new tree node. More...
 
void Mtr_DeallocNode (MtrNode *node)
 Deallocates tree node. More...
 
MtrNodeMtr_InitTree (void)
 Initializes tree with one node. More...
 
void Mtr_FreeTree (MtrNode *node)
 Disposes of tree rooted at node. More...
 
MtrNodeMtr_CopyTree (MtrNode const *node, int expansion)
 Makes a copy of tree. More...
 
void Mtr_MakeFirstChild (MtrNode *parent, MtrNode *child)
 Makes child the first child of parent. More...
 
void Mtr_MakeLastChild (MtrNode *parent, MtrNode *child)
 Makes child the last child of parent. More...
 
MtrNodeMtr_CreateFirstChild (MtrNode *parent)
 Creates a new node and makes it the first child of parent. More...
 
MtrNodeMtr_CreateLastChild (MtrNode *parent)
 Creates a new node and makes it the last child of parent. More...
 
void Mtr_MakeNextSibling (MtrNode *first, MtrNode *second)
 Makes second the next sibling of first. More...
 
void Mtr_PrintTree (MtrNode const *node)
 Prints a tree, one node per line. More...
 

Detailed Description

Basic manipulation of multiway branching trees.

See also
cudd package
Author
Fabio Somenzi

Function Documentation

◆ Mtr_AllocNode()

MtrNode* Mtr_AllocNode ( void  )

Allocates new tree node.

Returns
pointer to node.
Side effects None
See also
Mtr_DeallocNode

◆ Mtr_CopyTree()

MtrNode* Mtr_CopyTree ( MtrNode const *  node,
int  expansion 
)

Makes a copy of tree.

If parameter expansion is greater than 1, it will expand the tree by that factor. It is an error for expansion to be less than 1.

Returns
a pointer to the copy if successful; NULL otherwise.
Side effects None
See also
Mtr_InitTree

◆ Mtr_CreateFirstChild()

MtrNode* Mtr_CreateFirstChild ( MtrNode parent)

Creates a new node and makes it the first child of parent.

Returns
pointer to new child.
Side effects None
See also
Mtr_MakeFirstChild Mtr_CreateLastChild

◆ Mtr_CreateLastChild()

MtrNode* Mtr_CreateLastChild ( MtrNode parent)

Creates a new node and makes it the last child of parent.

Returns
pointer to new child.
Side effects None
See also
Mtr_MakeLastChild Mtr_CreateFirstChild

◆ Mtr_DeallocNode()

void Mtr_DeallocNode ( MtrNode node)

Deallocates tree node.

Side effects None
See also
Mtr_AllocNode
Parameters
nodenode to be deallocated

◆ Mtr_FreeTree()

void Mtr_FreeTree ( MtrNode node)

Disposes of tree rooted at node.

Side effects None
See also
Mtr_InitTree

◆ Mtr_InitTree()

MtrNode* Mtr_InitTree ( void  )

Initializes tree with one node.

Returns
pointer to node.
Side effects None
See also
Mtr_FreeTree Mtr_InitGroupTree

◆ Mtr_MakeFirstChild()

void Mtr_MakeFirstChild ( MtrNode parent,
MtrNode child 
)

Makes child the first child of parent.

Side effects None
See also
Mtr_MakeLastChild Mtr_CreateFirstChild

◆ Mtr_MakeLastChild()

void Mtr_MakeLastChild ( MtrNode parent,
MtrNode child 
)

Makes child the last child of parent.

Side effects None
See also
Mtr_MakeFirstChild Mtr_CreateLastChild

◆ Mtr_MakeNextSibling()

void Mtr_MakeNextSibling ( MtrNode first,
MtrNode second 
)

Makes second the next sibling of first.

Second becomes a child of the parent of first.

Side effects None

◆ Mtr_PrintTree()

void Mtr_PrintTree ( MtrNode const *  node)

Prints a tree, one node per line.

Side effects None
See also
Mtr_PrintGroups