21 #ifndef ABC__aig__deco__deco_h
22 #define ABC__aig__deco__deco_h
98 #define Dec_GraphForEachLeaf( pGraph, pLeaf, i ) \
99 for ( i = 0; (i < (pGraph)->nLeaves) && (((pLeaf) = Dec_GraphNode(pGraph, i)), 1); i++ )
101 #define Dec_GraphForEachNode( pGraph, pAnd, i ) \
102 for ( i = (pGraph)->nLeaves; (i < (pGraph)->nSize) && (((pAnd) = Dec_GraphNode(pGraph, i)), 1); i++ )
142 return (eEdge.Node << 1) | eEdge.fCompl;
216 pGraph->
nSize = nLeaves;
217 pGraph->
nCap = 2 * nLeaves + 50;
240 pGraph->
eRoot.fCompl = 1;
278 assert( 0 <= iLeaf && iLeaf < nLeaves );
280 pGraph->
eRoot.Node = iLeaf;
281 pGraph->
eRoot.fCompl = fCompl;
363 return pGraph->
eRoot.fCompl;
379 pGraph->
eRoot.fCompl ^= 1;
428 return pGraph->
pNodes + i;
460 return pNode - pGraph->
pNodes;
542 pGraph->
eRoot = eRoot;
588 pNode->
fCompl0 = eEdge0.fCompl;
589 pNode->
fCompl1 = eEdge1.fCompl;
612 pNode->
fCompl0 = eEdge0.fCompl;
613 pNode->
fCompl1 = eEdge1.fCompl;
static Dec_Node_t * Dec_GraphAppendNode(Dec_Graph_t *pGraph)
static Dec_Graph_t * Dec_GraphCreateConst1()
static Dec_Edge_t Dec_GraphAddNodeOr(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Dec_GraphLeaveNum(Dec_Graph_t *pGraph)
#define ABC_REALLOC(type, obj, num)
static int Dec_GraphIsConst1(Dec_Graph_t *pGraph)
static int Dec_GraphNodeInt(Dec_Graph_t *pGraph, Dec_Node_t *pNode)
static int Dec_GraphVarInt(Dec_Graph_t *pGraph)
#define ABC_ALLOC(type, num)
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
static void Dec_GraphComplement(Dec_Graph_t *pGraph)
static Dec_Graph_t * Dec_GraphCreateLeaf(int iLeaf, int nLeaves, int fCompl)
static Dec_Graph_t * Dec_GraphCreateConst0()
static unsigned Dec_EdgeToInt(Dec_Edge_t eEdge)
static Dec_Edge_t Dec_IntToEdge(unsigned Edge)
static int Dec_GraphNodeIsVar(Dec_Graph_t *pGraph, Dec_Node_t *pNode)
static Dec_Edge_t Dec_EdgeCreate(int Node, int fCompl)
FUNCTION DECLARATIONS ///.
static Dec_Edge_t Dec_GraphAddNodeAnd(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1)
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
unsigned short * puCanons
static int Dec_GraphIsComplement(Dec_Graph_t *pGraph)
static Dec_Graph_t * Dec_GraphCreate(int nLeaves)
#define ABC_NAMESPACE_HEADER_END
static int Dec_GraphNodeNum(Dec_Graph_t *pGraph)
static Dec_Edge_t Dec_GraphAddNodeXor(Dec_Graph_t *pGraph, Dec_Edge_t eEdge0, Dec_Edge_t eEdge1, int Type)
static int Dec_GraphIsConst0(Dec_Graph_t *pGraph)
static void Dec_GraphSetRoot(Dec_Graph_t *pGraph, Dec_Edge_t eRoot)
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
static Dec_Edge_t Dec_GraphAddNodeMux(Dec_Graph_t *pGraph, Dec_Edge_t eEdgeC, Dec_Edge_t eEdgeT, Dec_Edge_t eEdgeE, int Type)
static Dec_Node_t * Dec_GraphNodeLast(Dec_Graph_t *pGraph)
static Dec_Node_t * Dec_GraphVar(Dec_Graph_t *pGraph)
static int Dec_GraphIsConst(Dec_Graph_t *pGraph)
static Dec_Edge_t Dec_IntToEdge_(unsigned m)
static unsigned Dec_EdgeToInt_(Dec_Edge_t m)
static void Dec_GraphFree(Dec_Graph_t *pGraph)