49 int nCubesInit, nCubesOld, nIter;
53 nCubesInit = p->nCubes;
55 nCubesOld = p->nCubes;
59 while ( 100.0*(nCubesOld - p->nCubes)/nCubesOld > 3.0 );
83 int v00, v01, v10, v11, Var0, Var1, Index, nCubesOld;
87 p->pBubble->
pNext = p->ppStore[0];
88 p->ppStore[0] = p->pBubble;
89 p->pBubble->
nLits = 0;
95 Index = p->pBubble->nLits;
99 if ( pCube == p->pBubble )
101 assert( pCube == p->pBubble );
104 *ppPrev = p->pBubble->
pNext;
105 pCube = p->pBubble->
pNext;
107 for ( Index++; Index <= p->nVars; Index++ )
108 if ( p->ppStore[Index] )
110 ppPrev = &(p->ppStore[Index]);
111 pCube = p->ppStore[Index];
122 if ( pThis == NULL && Index < p->nVars )
126 if ( pThis == NULL && Index < p->nVars - 1 )
134 p->pBubble->pNext = pCube->
pNext;
135 pCube->
pNext = p->pBubble;
142 *ppPrevT = pThis->
pNext;
143 *ppPrev = p->pBubble;
164 pCube->
nLits -= (v00 != 3);
165 pCube->
nLits += ((v00 ^ v10) != 3);
167 pThis->
nLits -= (v11 != 3);
168 pThis->
nLits += ((v01 ^ v11) != 3);
171 nCubesOld = p->nCubes;
175 if ( p->nCubes < nCubesOld + 2 )
187 pCube->
nLits -= ((v00 ^ v10) != 3);
188 pCube->
nLits += (v00 != 3);
190 pCube->
nLits -= (v01 != 3);
191 pCube->
nLits += ((v01 ^ v11) != 3);
194 pThis->
nLits -= (v10 != 3);
195 pThis->
nLits += ((v00 ^ v10) != 3);
197 pThis->
nLits -= ((v01 ^ v11) != 3);
198 pThis->
nLits += (v11 != 3);
228 *ppPrev = pThis->
pNext;
241 *ppPrev = pThis->
pNext;
253 *ppPrev = pThis->
pNext;
261 if ( pCube->
nLits > 0 )
266 *ppPrev = pThis->
pNext;
275 p->ppStore[pCube->
nLits] = pCube;
293 assert( pCube != p->pBubble );
static void Min_CubeRecycle(Min_Man_t *p, Min_Cube_t *pCube)
int Min_EsopAddCubeInt(Min_Man_t *p, Min_Cube_t *pCube)
static void Min_CubeXorVar(Min_Cube_t *p, int Var, int Value)
static int Min_CubeCountLits(Min_Cube_t *pCube)
static int Min_CubesDistOne(Min_Cube_t *pCube0, Min_Cube_t *pCube1, Min_Cube_t *pTemp)
static int Min_CubesDistTwo(Min_Cube_t *pCube0, Min_Cube_t *pCube1, int *pVar0, int *pVar1)
static int Min_CubeGetVar(Min_Cube_t *p, int Var)
#define ABC_NAMESPACE_IMPL_END
static void Min_CubesTransform(Min_Cube_t *pCube, Min_Cube_t *pDist, Min_Cube_t *pMask)
#define ABC_NAMESPACE_IMPL_START
#define Min_CoverForEachCubePrev(pCover, pCube, ppPrev)
static int Min_CubesAreEqual(Min_Cube_t *pCube0, Min_Cube_t *pCube1)
static ABC_NAMESPACE_IMPL_START void Min_EsopRewrite(Min_Man_t *p)
DECLARATIONS ///.
void Min_EsopMinimize(Min_Man_t *p)
FUNCTION DEFINITIONS ///.
void Min_EsopAddCube(Min_Man_t *p, Min_Cube_t *pCube)
typedefABC_NAMESPACE_HEADER_START struct Min_Man_t_ Min_Man_t
DECLARATIONS ///.