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

DdNodeCudd_addApply (DdManager *dd, DD_AOP op, DdNode *f, DdNode *g)
 Applies op to the corresponding discriminants of f and g. More...
 
DdNodeCudd_addPlus (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point addition. More...
 
DdNodeCudd_addTimes (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point multiplication. More...
 
DdNodeCudd_addThreshold (DdManager *dd, DdNode **f, DdNode **g)
 f if f≥g; 0 if f<g. More...
 
DdNodeCudd_addSetNZ (DdManager *dd, DdNode **f, DdNode **g)
 This operator sets f to the value of g wherever g != 0. More...
 
DdNodeCudd_addDivide (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point division. More...
 
DdNodeCudd_addMinus (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point subtraction. More...
 
DdNodeCudd_addMinimum (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point min. More...
 
DdNodeCudd_addMaximum (DdManager *dd, DdNode **f, DdNode **g)
 Integer and floating point max. More...
 
DdNodeCudd_addOneZeroMaximum (DdManager *dd, DdNode **f, DdNode **g)
 Returns 1 if f > g and 0 otherwise. More...
 
DdNodeCudd_addDiff (DdManager *dd, DdNode **f, DdNode **g)
 Returns plusinfinity if f=g; returns min(f,g) if f!=g. More...
 
DdNodeCudd_addAgreement (DdManager *dd, DdNode **f, DdNode **g)
 f if f==g; background if f!=g. More...
 
DdNodeCudd_addOr (DdManager *dd, DdNode **f, DdNode **g)
 Disjunction of two 0-1 ADDs. More...
 
DdNodeCudd_addNand (DdManager *dd, DdNode **f, DdNode **g)
 NAND of two 0-1 ADDs. More...
 
DdNodeCudd_addNor (DdManager *dd, DdNode **f, DdNode **g)
 NOR of two 0-1 ADDs. More...
 
DdNodeCudd_addXor (DdManager *dd, DdNode **f, DdNode **g)
 XOR of two 0-1 ADDs. More...
 
DdNodeCudd_addXnor (DdManager *dd, DdNode **f, DdNode **g)
 XNOR of two 0-1 ADDs. More...
 
DdNodeCudd_addMonadicApply (DdManager *dd, DD_MAOP op, DdNode *f)
 Applies op to the discriminants of f. More...
 
DdNodeCudd_addLog (DdManager *dd, DdNode *f)
 Natural logarithm of an ADD. More...
 
DdNodecuddAddApplyRecur (DdManager *dd, DD_AOP op, DdNode *f, DdNode *g)
 Performs the recursive step of Cudd_addApply. More...
 
DdNodecuddAddMonadicApplyRecur (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

◆ Cudd_addAgreement()

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

◆ 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

◆ Cudd_addDiff()

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

◆ Cudd_addDivide()

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

◆ Cudd_addLog()

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

◆ Cudd_addMaximum()

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

◆ Cudd_addMinimum()

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

◆ Cudd_addMinus()

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

◆ Cudd_addMonadicApply()

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

◆ Cudd_addNand()

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

◆ Cudd_addNor()

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

◆ Cudd_addOneZeroMaximum()

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

◆ Cudd_addOr()

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

◆ Cudd_addPlus()

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

◆ Cudd_addSetNZ()

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

◆ Cudd_addThreshold()

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

◆ Cudd_addTimes()

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

◆ Cudd_addXnor()

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

◆ Cudd_addXor()

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

◆ cuddAddApplyRecur()

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

◆ 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