
Go to the source code of this file.
Functions | |
| MtrNode * | Mtr_InitGroupTree (int lower, int size) |
| MtrNode * | Mtr_MakeGroup (MtrNode *root, unsigned int low, unsigned int size, unsigned int flags) |
| MtrNode * | Mtr_DissolveGroup (MtrNode *group) |
| MtrNode * | Mtr_FindGroup (MtrNode *root, unsigned int low, unsigned int size) |
| int | Mtr_SwapGroups (MtrNode *first, MtrNode *second) |
| void | Mtr_PrintGroups (MtrNode *root, int silent) |
| MtrNode * | Mtr_ReadGroups (FILE *fp, int nleaves) |
Function********************************************************************
Synopsis [Merges the children of ‘group’ with the children of its parent.]
Description [Merges the children of ‘group’ with the children of its parent. Disposes of the node pointed by group. If group is the root of the group tree, this procedure leaves the tree unchanged. Returns the pointer to the parent of ‘group’ upon successful termination; NULL otherwise.]
SideEffects [None]
SeeAlso [Mtr_MakeGroup]
Definition at line 357 of file mtrGroup.c.

Function********************************************************************
Synopsis [Finds a group with size leaves starting at low, if it exists.]
Description [Finds a group with size leaves starting at low, if it exists. This procedure relies on the low and size fields of each node. It also assumes that the children of each node are sorted in order of increasing low. Returns the pointer to the root of the group upon successful termination; NULL otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 409 of file mtrGroup.c.


| MtrNode * Mtr_InitGroupTree | ( | int | lower, |
| int | size ) |
AutomaticEnd Function********************************************************************
Synopsis [Allocate new tree.]
Description [Allocate new tree with one node, whose low and size fields are specified by the lower and size parameters. Returns pointer to tree root.]
SideEffects [None]
SeeAlso [Mtr_InitTree Mtr_FreeTree]
Definition at line 121 of file mtrGroup.c.


Function********************************************************************
Synopsis [Makes a new group with size leaves starting at low.]
Description [Makes a new group with size leaves starting at low. If the new group intersects an existing group, it must either contain it or be contained by it. This procedure relies on the low and size fields of each node. It also assumes that the children of each node are sorted in order of increasing low. In case of a valid request, the flags of the new group are set to the value passed in ‘flags.’ This can also be used to change the flags of an existing group. Returns the pointer to the root of the new group upon successful termination; NULL otherwise. If the group already exists, the pointer to its root is returned.]
SideEffects [None]
SeeAlso [Mtr_DissolveGroup Mtr_ReadGroups Mtr_FindGroup]
Definition at line 158 of file mtrGroup.c.


| void Mtr_PrintGroups | ( | MtrNode * | root, |
| int | silent ) |
Function********************************************************************
Synopsis [Prints the groups as a parenthesized list.]
Description [Prints the groups as a parenthesized list. After each group, the group's flag are printed, preceded by a ‘|’. For each flag (except MTR_TERMINAL) a character is printed.
The second argument, silent, if different from 0, causes Mtr_PrintGroups to only check the syntax of the group tree. ]
SideEffects [None]
SeeAlso [Mtr_PrintTree]
Definition at line 537 of file mtrGroup.c.


| MtrNode * Mtr_ReadGroups | ( | FILE * | fp, |
| int | nleaves ) |
Function********************************************************************
Synopsis [Reads groups from a file and creates a group tree.]
Description [Reads groups from a file and creates a group tree. Each group is specified by three fields: <xmp> low size flags. </xmp> Low and size are (short) integers. Flags is a string composed of the following characters (with associated translation):
Normally, the only flags that are needed are D and F. Groups and fields are separated by white space (spaces, tabs, and newlines). Returns a pointer to the group tree if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [Mtr_InitGroupTree Mtr_MakeGroup]
Definition at line 611 of file mtrGroup.c.

Function********************************************************************
Synopsis [Swaps two children of a tree node.]
Description [Swaps two children of a tree node. Adjusts the high and low fields of the two nodes and their descendants. The two children must be adjacent. However, first may be the younger sibling of second. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 470 of file mtrGroup.c.