64 if ( pSingle == NULL )
70 if ( pDouble == NULL )
78 pVar1 = pSingle->
pVar1;
79 pVar2 = pSingle->
pVar2;
90 pCubeNew->
pFirst = pCubeNew;
159 pVar1 = pSingle->
pVar1;
160 pVar2 = pSingle->
pVar2;
166 pCubeNew->
pFirst = pCubeNew;
222 Fxu_Cube * pCube, * pCubeNew1, * pCubeNew2;
234 pCubeNew1->
pFirst = pCubeNew1;
236 pCubeNew2->
pFirst = pCubeNew1;
238 pVarD->
pFirst = pCubeNew1;
294 for ( i = 0; i < p->vPairs->nSize; i++ )
298 pPair = (
Fxu_Pair *)p->vPairs->pArray[i];
320 p->vPairs->nSize = 0;
338 int nBase, nLits1, nLits2;
341 nBase = nLits1 = nLits2 = 0;
347 if ( pLit1 && pLit2 )
355 else if ( pLit1->
iVar < pLit2->
iVar )
370 else if ( pLit1 && !pLit2 )
377 else if ( !pLit1 && pLit2 )
412 bLit1Next = pLit1? pLit1->
pHNext: NULL;
413 bLit2Next = pLit2? pLit2->
pHNext: NULL;
418 if ( pLit1 && pLit2 )
430 bLit1Next = pLit1? pLit1->
pHNext: NULL;
431 bLit2Next = pLit2? pLit2->
pHNext: NULL;
433 else if ( pLit1->
iVar < pLit2->
iVar )
442 bLit1Next = pLit1? pLit1->
pHNext: NULL;
453 bLit2Next = pLit2? pLit2->
pHNext: NULL;
456 else if ( pLit1 && !pLit2 )
465 bLit1Next = pLit1? pLit1->
pHNext: NULL;
467 else if ( !pLit1 && pLit2 )
476 bLit2Next = pLit2? pLit2->
pHNext: NULL;
502 bLit1Next = pLit1? pLit1->
pVNext: NULL;
503 bLit2Next = pLit2? pLit2->
pVNext: NULL;
506 if ( pLit1 && pLit2 )
529 bLit1Next = pLit1? pLit1->
pVNext: NULL;
530 bLit2Next = pLit2? pLit2->
pVNext: NULL;
535 bLit1Next = pLit1? pLit1->
pVNext: NULL;
540 bLit2Next = pLit2? pLit2->
pVNext: NULL;
546 bLit1Next = pLit1? pLit1->
pVNext: NULL;
551 bLit2Next = pLit2? pLit2->
pVNext: NULL;
554 else if ( pLit1 && !pLit2 )
557 bLit1Next = pLit1? pLit1->
pVNext: NULL;
559 else if ( !pLit1 && pLit2 )
562 bLit2Next = pLit2? pLit2->
pVNext: NULL;
585 p->vPairs->nSize = 0;
588 if ( p->vPairs->nSize < 2 )
591 qsort( (
void *)p->vPairs->pArray, p->vPairs->nSize,
sizeof(
Fxu_Pair *),
611 int iP1CubeMin, iP2CubeMin;
618 if ( iP1CubeMin < iP2CubeMin )
620 if ( iP1CubeMin > iP2CubeMin )
686 pDivCur = pPair->
pDiv;
688 if ( pDivCur == pDiv )
773 if ( WeightNew >= 0 )
775 pSingle->
Weight = WeightNew;
void Fxu_UpdateSingle(Fxu_Matrix *p)
#define Fxu_MatrixForEachSingleSafe(Matrix, Single, Single2)
static void Fxu_UpdateCleanOldSingles(Fxu_Matrix *p)
static void Fxu_UpdateAddNewSingles(Fxu_Matrix *p, Fxu_Var *pVar)
static void Fxu_UpdateCreateNewVars(Fxu_Matrix *p, Fxu_Var **ppVarC, Fxu_Var **ppVarD, int nCubes)
void Fxu_ListTableDelDivisor(Fxu_Matrix *p, Fxu_Double *pDiv)
void Fxu_PairClearStorage(Fxu_Cube *pCube)
void Fxu_MatrixAddDivisor(Fxu_Matrix *p, Fxu_Cube *pCube1, Fxu_Cube *pCube2)
void Fxu_HeapDoubleDelete(Fxu_HeapDouble *p, Fxu_Double *pDiv)
static int Fxu_UpdatePairCompare(Fxu_Pair **ppP1, Fxu_Pair **ppP2)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define Fxu_PairMaxCube(pPair)
Fxu_Double * Fxu_HeapDoubleGetMax(Fxu_HeapDouble *p)
#define Fxu_MatrixRingCubesAdd(Matrix, Cube)
void Fxu_UpdateDouble(Fxu_Matrix *p)
static void Fxu_UpdateMatrixSingleClean(Fxu_Matrix *p, Fxu_Var *pVar1, Fxu_Var *pVar2, Fxu_Var *pVarNew)
static void Fxu_UpdateMatrixDoubleClean(Fxu_Matrix *p, Fxu_Cube *pCubeUse, Fxu_Cube *pCubeRem)
int Fxu_HeapDoubleReadMaxWeight(Fxu_HeapDouble *p)
void Fxu_MatrixAddLiteral(Fxu_Matrix *p, Fxu_Cube *pCube, Fxu_Var *pVar)
#define Fxu_DoubleForEachPair(Div, Pair)
static void Fxu_UpdateMatrixDoubleCreateCubes(Fxu_Matrix *p, Fxu_Cube *pCube1, Fxu_Cube *pCube2, Fxu_Double *pDiv)
void Fxu_MatrixDelLiteral(Fxu_Matrix *p, Fxu_Lit *pLit)
#define Fxu_MatrixRingVarsStart(Matrix)
#define Fxu_MatrixRingCubesStop(Matrix)
static void Fxu_UpdateCleanOldDoubles(Fxu_Matrix *p, Fxu_Double *pDiv, Fxu_Cube *pCube)
#define Fxu_MatrixRingCubesStart(Matrix)
void Fxu_HeapDoubleUpdate(Fxu_HeapDouble *p, Fxu_Double *pDiv)
#define ABC_NAMESPACE_IMPL_END
Fxu_Cube * Fxu_MatrixAddCube(Fxu_Matrix *p, Fxu_Var *pVar, int iCube)
void Fxu_MatrixDelDivisor(Fxu_Matrix *p, Fxu_Double *pDiv)
void Fxu_MatrixRingVarsUnmark(Fxu_Matrix *p)
#define Fxu_MatrixRingVarsAdd(Matrix, Var)
void Fxu_MatrixComputeSinglesOne(Fxu_Matrix *p, Fxu_Var *pVar)
#define Fxu_MatrixForEachCubeInRing(Matrix, Cube)
#define MEM_FREE_FXU(Manager, Type, Size, Pointer)
#define ABC_NAMESPACE_IMPL_START
int Fxu_SingleCountCoincidence(Fxu_Matrix *p, Fxu_Var *pVar1, Fxu_Var *pVar2)
void Fxu_ListMatrixDelSingle(Fxu_Matrix *p, Fxu_Single *pSingle)
static ABC_NAMESPACE_IMPL_START void Fxu_UpdateDoublePairs(Fxu_Matrix *p, Fxu_Double *pDouble, Fxu_Var *pVar)
DECLARATIONS ///.
void Fxu_HeapSingleUpdate(Fxu_HeapSingle *p, Fxu_Single *pSingle)
Fxu_Single * Fxu_HeapSingleReadMax(Fxu_HeapSingle *p)
int Fxu_HeapSingleReadMaxWeight(Fxu_HeapSingle *p)
static void Fxu_UpdateAddNewDoubles(Fxu_Matrix *p, Fxu_Cube *pCube)
#define Fxu_MatrixRingVarsStop(Matrix)
#define Fxu_PairMinCube(pPair)
typedefABC_NAMESPACE_HEADER_START struct FxuMatrix Fxu_Matrix
INCLUDES ///.
void Fxu_HeapSingleDelete(Fxu_HeapSingle *p, Fxu_Single *pSingle)
void Fxu_Update(Fxu_Matrix *p, Fxu_Single *pSingle, Fxu_Double *pDouble)
FUNCTION DEFINITIONS ///.
Fxu_Var * Fxu_MatrixAddVar(Fxu_Matrix *p)
#define Fxu_CubeForEachPair(pCube, pPair, i)
static void Fxu_UpdatePairsSort(Fxu_Matrix *p, Fxu_Double *pDouble)
void Fxu_ListDoubleDelPair(Fxu_Double *pDiv, Fxu_Pair *pPair)
#define Fxu_PairMinCubeInt(pPair)
void Fxu_MatrixRingCubesUnmark(Fxu_Matrix *p)