39static void Fxu_UpdateCleanOldSingles(
Fxu_Matrix *
p );
64 if ( pSingle == NULL )
70 if ( pDouble == NULL )
78 pVar1 = pSingle->
pVar1;
79 pVar2 = pSingle->
pVar2;
87 Fxu_UpdateCreateNewVars(
p, &pVarC, &pVarD, 1 );
90 pCubeNew->
pFirst = pCubeNew;
103 Fxu_UpdateMatrixSingleClean(
p, pVar1, pVar2, pVarD );
106 Fxu_UpdateDoublePairs(
p, pDouble, pVarC );
120 Fxu_UpdateAddNewDoubles(
p, pCube );
122 Fxu_UpdateCleanOldSingles(
p );
130 Fxu_UpdateAddNewSingles(
p, pVarC );
131 Fxu_UpdateAddNewSingles(
p, pVarD );
159 pVar1 = pSingle->
pVar1;
160 pVar2 = pSingle->
pVar2;
163 Fxu_UpdateCreateNewVars(
p, &pVarC, &pVarD, 1 );
166 pCubeNew->
pFirst = pCubeNew;
179 Fxu_UpdateMatrixSingleClean(
p, pVar1, pVar2, pVarD );
193 Fxu_UpdateAddNewDoubles(
p, pCube );
195 Fxu_UpdateCleanOldSingles(
p );
203 Fxu_UpdateAddNewSingles(
p, pVarC );
204 Fxu_UpdateAddNewSingles(
p, pVarD );
222 Fxu_Cube * pCube, * pCubeNew1, * pCubeNew2;
231 Fxu_UpdateCreateNewVars(
p, &pVarC, &pVarD, 2 );
234 pCubeNew1->
pFirst = pCubeNew1;
236 pCubeNew2->
pFirst = pCubeNew1;
238 pVarD->
pFirst = pCubeNew1;
241 Fxu_UpdateMatrixDoubleCreateCubes(
p, pCubeNew1, pCubeNew2, pDiv );
248 Fxu_UpdateDoublePairs(
p, pDiv, pVarD );
256 Fxu_UpdateAddNewDoubles(
p, pCube );
258 Fxu_UpdateCleanOldSingles(
p );
266 Fxu_UpdateAddNewSingles(
p, pVarC );
267 Fxu_UpdateAddNewSingles(
p, pVarD );
292 Fxu_UpdatePairsSort(
p, pDouble );
294 for ( i = 0; i <
p->vPairs->nSize; i++ )
298 pPair = (
Fxu_Pair *)
p->vPairs->pArray[i];
307 Fxu_UpdateMatrixDoubleClean(
p, pCubeUse, pCubeRem );
315 Fxu_UpdateCleanOldDoubles(
p, pDouble, pCubeUse );
316 Fxu_UpdateCleanOldDoubles(
p, pDouble, pCubeRem );
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 )
520 Fxu_UpdateCleanOldDoubles(
p, NULL, pLit1->
pCube );
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;
587 Vec_PtrPush(
p->vPairs, pPair );
588 if (
p->vPairs->nSize < 2 )
591 qsort( (
void *)
p->vPairs->pArray, (
size_t)
p->vPairs->nSize,
sizeof(
Fxu_Pair *),
592 (int (*)(
const void *,
const void *)) Fxu_UpdatePairCompare );
593 assert( Fxu_UpdatePairCompare( (
Fxu_Pair**)
p->vPairs->pArray, (
Fxu_Pair**)
p->vPairs->pArray +
p->vPairs->nSize - 1 ) < 0 );
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;
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Fxu_HeapDoubleUpdate(Fxu_HeapDouble *p, Fxu_Double *pDiv)
int Fxu_HeapDoubleReadMaxWeight(Fxu_HeapDouble *p)
void Fxu_HeapDoubleDelete(Fxu_HeapDouble *p, Fxu_Double *pDiv)
Fxu_Double * Fxu_HeapDoubleGetMax(Fxu_HeapDouble *p)
Fxu_Single * Fxu_HeapSingleReadMax(Fxu_HeapSingle *p)
void Fxu_HeapSingleUpdate(Fxu_HeapSingle *p, Fxu_Single *pSingle)
void Fxu_HeapSingleDelete(Fxu_HeapSingle *p, Fxu_Single *pSingle)
int Fxu_HeapSingleReadMaxWeight(Fxu_HeapSingle *p)
void Fxu_ListTableDelDivisor(Fxu_Matrix *p, Fxu_Double *pDiv)
Fxu_Var * Fxu_MatrixAddVar(Fxu_Matrix *p)
int Fxu_SingleCountCoincidence(Fxu_Matrix *p, Fxu_Var *pVar1, Fxu_Var *pVar2)
#define Fxu_PairMinCubeInt(pPair)
void Fxu_PairClearStorage(Fxu_Cube *pCube)
#define Fxu_MatrixRingVarsStart( Matrix)
#define Fxu_MatrixForEachCubeInRing(Matrix, Cube)
#define Fxu_MatrixRingVarsAdd( Matrix, Var)
void Fxu_MatrixAddLiteral(Fxu_Matrix *p, Fxu_Cube *pCube, Fxu_Var *pVar)
struct FxuSingle Fxu_Single
void Fxu_MatrixDelDivisor(Fxu_Matrix *p, Fxu_Double *pDiv)
#define Fxu_PairMaxCube(pPair)
typedefABC_NAMESPACE_HEADER_START struct FxuMatrix Fxu_Matrix
INCLUDES ///.
void Fxu_MatrixDelLiteral(Fxu_Matrix *p, Fxu_Lit *pLit)
#define Fxu_MatrixForEachSingleSafe(Matrix, Single, Single2)
struct FxuDouble Fxu_Double
#define Fxu_PairMinCube(pPair)
#define Fxu_MatrixRingCubesStop( Matrix)
void Fxu_MatrixAddDivisor(Fxu_Matrix *p, Fxu_Cube *pCube1, Fxu_Cube *pCube2)
#define Fxu_DoubleForEachPair(Div, Pair)
#define Fxu_MatrixRingCubesStart(Matrix)
#define Fxu_CubeForEachPair(pCube, pPair, i)
Fxu_Cube * Fxu_MatrixAddCube(Fxu_Matrix *p, Fxu_Var *pVar, int iCube)
#define MEM_FREE_FXU(Manager, Type, Size, Pointer)
#define Fxu_MatrixRingVarsStop( Matrix)
void Fxu_ListMatrixDelSingle(Fxu_Matrix *p, Fxu_Single *pSingle)
#define Fxu_MatrixRingCubesAdd(Matrix, Cube)
void Fxu_MatrixComputeSinglesOne(Fxu_Matrix *p, Fxu_Var *pVar)
void Fxu_ListDoubleDelPair(Fxu_Double *pDiv, Fxu_Pair *pPair)
void Fxu_UpdateDouble(Fxu_Matrix *p)
void Fxu_UpdateSingle(Fxu_Matrix *p)
void Fxu_Update(Fxu_Matrix *p, Fxu_Single *pSingle, Fxu_Double *pDouble)
FUNCTION DEFINITIONS ///.
void Fxu_MatrixRingCubesUnmark(Fxu_Matrix *p)
void Fxu_MatrixRingVarsUnmark(Fxu_Matrix *p)