cudd/cuddAddFind.c File Reference

Functions to find maximum and minimum in an ADD and to extract the i-th bit. More...

#include "util.h"
#include "cuddInt.h"
Include dependency graph for cuddAddFind.c:

Functions

DdNodeCudd_addFindMax (DdManager *dd, DdNode *f)
 Finds the maximum discriminant of f.
DdNodeCudd_addFindMin (DdManager *dd, DdNode *f)
 Finds the minimum discriminant of f.
DdNodeCudd_addIthBit (DdManager *dd, DdNode *f, int bit)
 Extracts the i-th bit from an ADD.
static DdNodeaddDoIthBit (DdManager *dd, DdNode *f, DdNode *index)
 Performs the recursive step for Cudd_addIthBit.

Detailed Description

Functions to find maximum and minimum in an ADD and to extract the i-th bit.

Author:
Fabio Somenzi

Copyright (c) 1995-2015, 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.


Function Documentation

static DdNode* addDoIthBit ( DdManager dd,
DdNode f,
DdNode index 
) [static]

Performs the recursive step for Cudd_addIthBit.

Returns:
a pointer to the BDD if successful; NULL otherwise.
Side effects
None
DdNode* Cudd_addFindMax ( DdManager dd,
DdNode f 
)

Finds the maximum discriminant of f.

Returns:
a pointer to a constant ADD.
Side effects
None
DdNode* Cudd_addFindMin ( DdManager dd,
DdNode f 
)

Finds the minimum discriminant of f.

Returns:
a pointer to a constant ADD.
Side effects
None
DdNode* Cudd_addIthBit ( DdManager dd,
DdNode f,
int  bit 
)

Extracts the i-th bit from an ADD.

Produces an ADD from another ADD by replacing all discriminants whose i-th bit is equal to 1 with 1, and all other discriminants with 0. The i-th bit refers to the integer representation of the leaf value. If the value has a fractional part, it is ignored. Repeated calls to this procedure allow one to transform an integer-valued ADD into an array of ADDs, one for each bit of the leaf values.

Returns:
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addBddIthBit
 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated on 31 Dec 2015 for cudd by  doxygen 1.6.1