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

Apply functions for ADDs and their operators. More...

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

Functions

DdNode * Cudd_addApply (DdManager *dd, DD_AOP op, DdNode *f, DdNode *g)
 Applies op to the corresponding discriminants of f and g. More...
 
DdNode * Cudd_addPlus (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point addition. More...
 
DdNode * Cudd_addTimes (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point multiplication. More...
 
DdNode * Cudd_addThreshold (DdManager *dd, DdNode **f, DdNode **g)
 f if f≥g; 0 if f<g. More...
 
DdNode * Cudd_addSetNZ (DdManager *dd, DdNode **f, DdNode **g)
 This operator sets f to the value of g wherever g != 0. More...
 
DdNode * Cudd_addDivide (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point division. More...
 
DdNode * Cudd_addMinus (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point subtraction. More...
 
DdNode * Cudd_addMinimum (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point min. More...
 
DdNode * Cudd_addMaximum (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point max. More...
 
DdNode * Cudd_addOneZeroMaximum (DdManager *dd, DdNode **f, DdNode **g)
 Returns 1 if f > g and 0 otherwise. More...
 
DdNode * Cudd_addDiff (DdManager *dd, DdNode **f, DdNode **g)
 Returns plusinfinity if f=g; returns min(f,g) if f!=g. More...
 
DdNode * Cudd_addAgreement (DdManager *dd, DdNode **f, DdNode **g)
 f if f==g; background if f!=g. More...
 
DdNode * Cudd_addOr (DdManager *dd, DdNode **f, DdNode **g)
 Disjunction of two 0-1 ADDs. More...
 
DdNode * Cudd_addNand (DdManager *dd, DdNode **f, DdNode **g)
 NAND of two 0-1 ADDs. More...
 
DdNode * Cudd_addNor (DdManager *dd, DdNode **f, DdNode **g)
 NOR of two 0-1 ADDs. More...
 
DdNode * Cudd_addXor (DdManager *dd, DdNode **f, DdNode **g)
 XOR of two 0-1 ADDs. More...
 
DdNode * Cudd_addXnor (DdManager *dd, DdNode **f, DdNode **g)
 XNOR of two 0-1 ADDs. More...
 
DdNode * Cudd_addMonadicApply (DdManager *dd, DD_MAOP op, DdNode *f)
 Applies op to the discriminants of f. More...
 
DdNode * Cudd_addLog (DdManager *dd, DdNode *f)
 Natural logarithm of an ADD. More...
 
DdNode * cuddAddApplyRecur (DdManager *dd, DD_AOP op, DdNode *f, DdNode *g)
 Performs the recursive step of Cudd_addApply. More...
 
DdNode * cuddAddMonadicApplyRecur (DdManager *dd, DD_MAOP op, DdNode *f)
 Performs the recursive step of Cudd_addMonadicApply. More...
 

Detailed Description

Apply functions for ADDs and their operators.

Author
Fabio Somenzi

Function Documentation

DdNode* Cudd_addAgreement ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

f if f==g; background if f!=g.

Returns
NULL if not a terminal case; f op g otherwise, where f op g is f if f==g; background if f!=g.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addApply ( DdManager *  dd,
DD_AOP  op,
DdNode *  f,
DdNode *  g 
)

Applies op to the corresponding discriminants of f and g.

Returns
a pointer to the result if succssful; NULL otherwise.
Side effects
None
See also
Cudd_addMonadicApply Cudd_addPlus Cudd_addTimes Cudd_addThreshold Cudd_addSetNZ Cudd_addDivide Cudd_addMinus Cudd_addMinimum Cudd_addMaximum Cudd_addOneZeroMaximum Cudd_addDiff Cudd_addAgreement Cudd_addOr Cudd_addNand Cudd_addNor Cudd_addXor Cudd_addXnor
Parameters
ddmanager
opoperator
ffirst operand
gsecond operand
DdNode* Cudd_addDiff ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Returns plusinfinity if f=g; returns min(f,g) if f!=g.

Returns
NULL if not a terminal case; f op g otherwise, where f op g is plusinfinity if f=g; min(f,g) if f!=g.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addDivide ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Integer and floating point division.

Returns
NULL if not a terminal case; f / g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addLog ( DdManager *  dd,
DdNode *  f 
)

Natural logarithm of an ADD.

The discriminants of f must be positive double's.

Returns
NULL if not a terminal case; log(f) otherwise.
Side effects
None
See also
Cudd_addMonadicApply
DdNode* Cudd_addMaximum ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Integer and floating point max.

Integer and floating point max for Cudd_addApply.

Returns
NULL if not a terminal case; max(f,g) otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addMinimum ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Integer and floating point min.

Integer and floating point min for Cudd_addApply.

Returns
NULL if not a terminal case; min(f,g) otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addMinus ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Integer and floating point subtraction.

Returns
NULL if not a terminal case; f - g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addMonadicApply ( DdManager *  dd,
DD_MAOP  op,
DdNode *  f 
)

Applies op to the discriminants of f.

Returns
a pointer to the result if succssful; NULL otherwise.
Side effects
None
See also
Cudd_addApply Cudd_addLog
DdNode* Cudd_addNand ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

NAND of two 0-1 ADDs.

Returns
NULL if not a terminal case; f NAND g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addNor ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

NOR of two 0-1 ADDs.

Returns
NULL if not a terminal case; f NOR g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addOneZeroMaximum ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Returns 1 if f > g and 0 otherwise.

Used in conjunction with Cudd_addApply.

Returns
NULL if not a terminal case.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addOr ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Disjunction of two 0-1 ADDs.

Returns
NULL if not a terminal case; f OR g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addPlus ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Integer and floating point addition.

Returns
NULL if not a terminal case; f+g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addSetNZ ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

This operator sets f to the value of g wherever g != 0.

Returns
NULL if not a terminal case; f op g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addThreshold ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

f if f≥g; 0 if f<g.

Threshold operator for Apply (f if f ≥g; 0 if f<g).

Returns
NULL if not a terminal case; f op g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addTimes ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

Integer and floating point multiplication.

This function can be used also to take the AND of two 0-1 ADDs.

Returns
NULL if not a terminal case; f * g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addXnor ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

XNOR of two 0-1 ADDs.

Returns
NULL if not a terminal case; f XNOR g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* Cudd_addXor ( DdManager *  dd,
DdNode **  f,
DdNode **  g 
)

XOR of two 0-1 ADDs.

Returns
NULL if not a terminal case; f XOR g otherwise.
Side effects
None
See also
Cudd_addApply
DdNode* cuddAddApplyRecur ( DdManager *  dd,
DD_AOP  op,
DdNode *  f,
DdNode *  g 
)

Performs the recursive step of Cudd_addApply.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects
None
See also
cuddAddMonadicApplyRecur
DdNode* cuddAddMonadicApplyRecur ( DdManager *  dd,
DD_MAOP  op,
DdNode *  f 
)

Performs the recursive step of Cudd_addMonadicApply.

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