abc-master
|
Go to the source code of this file.
Functions | |
static int | mtrShiftHL (MtrNode *node, int shift) |
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) |
Variables | |
static ABC_NAMESPACE_IMPL_START char rcsid[] | MTR_UNUSED = "$Id: mtrGroup.c,v 1.18 2009/02/20 02:03:47 fabio Exp $" |
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.
|
static |
AutomaticStart
Function********************************************************************
Synopsis [Adjusts the low fields of a node and its descendants.]
Description [Adjusts the low fields of a node and its descendants. Adds shift to low of each node. Checks that no out-of-bounds values result. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 706 of file mtrGroup.c.
|
static |
CFile***********************************************************************
FileName [mtrGroup.c]
PackageName [mtr]
Synopsis [Functions to support group specification for reordering.]
Description [External procedures included in this module:
Static procedures included in this module:
]
SeeAlso [cudd package]
Author [Fabio Somenzi]
Copyright [Copyright (c) 1995-2004, Regents of the University of Colorado
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.]
Definition at line 85 of file mtrGroup.c.