cudd  3.0.0
The University of Colorado Decision Diagram Package
Functions
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. More...
 
DdNodeCudd_addFindMin (DdManager *dd, DdNode *f)
 Finds the minimum discriminant of f. More...
 
DdNodeCudd_addIthBit (DdManager *dd, DdNode *f, int bit)
 Extracts the i-th bit from an ADD. More...
 
static DdNodeaddDoIthBit (DdManager *dd, DdNode *f, DdNode *index)
 Performs the recursive step for Cudd_addIthBit. More...
 

Detailed Description

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

Author
Fabio Somenzi

Function Documentation

◆ addDoIthBit()

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

◆ Cudd_addFindMax()

DdNode* Cudd_addFindMax ( DdManager dd,
DdNode f 
)

Finds the maximum discriminant of f.

Returns
a pointer to a constant ADD.
Side effects None

◆ Cudd_addFindMin()

DdNode* Cudd_addFindMin ( DdManager dd,
DdNode f 
)

Finds the minimum discriminant of f.

Returns
a pointer to a constant ADD.
Side effects None

◆ Cudd_addIthBit()

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