57 pFile = fopen(
"matrix.txt",
"w" );
61 fprintf( pFile,
"Matrix has %d vars, %d cubes, %d literals, %d divisors.\n",
62 p->lVars.nItems, p->lCubes.nItems, p->nEntries, p->nDivs );
63 fprintf( pFile,
"Divisors selected so far: single = %d, double = %d.\n",
64 p->nDivs1, p->nDivs2 );
65 fprintf( pFile,
"\n" );
68 for ( i = 0; i < 12; i++ )
69 fprintf( pFile,
" " );
71 fprintf( pFile,
"%d", pVar->
iVar % 10 );
72 fprintf( pFile,
"\n" );
77 fprintf( pFile,
"%4d", pCube->
iCube );
78 fprintf( pFile,
" " );
79 fprintf( pFile,
"%4d", pCube->
pVar->
iVar );
80 fprintf( pFile,
" " );
86 for ( i = LastNum + 1; i < pLit->
pVar->
iVar; i++ )
87 fprintf( pFile,
"." );
88 fprintf( pFile,
"1" );
91 for ( i = LastNum + 1; i < p->lVars.nItems; i++ )
92 fprintf( pFile,
"." );
93 fprintf( pFile,
"\n" );
95 fprintf( pFile,
"\n" );
98 fprintf( pFile,
"The double divisors are:\n" );
101 fprintf( pFile,
"Divisor #%3d (lit=%d,%d) (w=%2d): ",
105 fprintf( pFile,
" <%d, %d> (b=%d)",
107 fprintf( pFile,
"\n" );
109 fprintf( pFile,
"\n" );
112 fprintf( pFile,
"The cubes are:\n" );
115 fprintf( pFile,
"Cube #%3d: ", pCube->
iCube );
119 fprintf( pFile,
" <%d %d> (d=%d) (b=%d)",
122 fprintf( pFile,
"\n" );
124 fprintf( pFile,
"\n" );
127 fprintf( pFile,
"The single divisors are:\n" );
130 fprintf( pFile,
"Single-cube divisor #%5d: Var1 = %4d. Var2 = %4d. Weight = %2d\n",
133 fprintf( pFile,
"\n" );
169 pProfile =
ABC_ALLOC(
int, (WeightMax + 1) );
170 memset( pProfile, 0,
sizeof(
int) * (WeightMax + 1) );
179 else if ( pDiv->
Weight < 0 )
182 pProfile[ pDiv->
Weight ]++;
185 fprintf( pFile,
"The double divisors profile:\n" );
186 fprintf( pFile,
"Weight < -1 divisors = %6d\n", CounterL );
187 fprintf( pFile,
"Weight -1 divisors = %6d\n", Counter1 );
188 for ( i = 0; i <= WeightMax; i++ )
190 fprintf( pFile,
"Weight %3d divisors = %6d\n", i, pProfile[i] );
191 fprintf( pFile,
"End of divisor profile printout\n" );
#define Fxu_MatrixForEachSingle(Matrix, Single)
#define ABC_ALLOC(type, num)
int Fxu_HeapDoubleReadMaxWeight(Fxu_HeapDouble *p)
#define Fxu_MatrixForEachVariable(Matrix, Var)
#define Fxu_DoubleForEachPair(Div, Pair)
#define Fxu_CubeForEachLiteral(Cube, Lit)
#define ABC_NAMESPACE_IMPL_END
void Fxu_MatrixPrintDivisorProfile(FILE *pFile, Fxu_Matrix *p)
#define ABC_NAMESPACE_IMPL_START
ABC_NAMESPACE_IMPL_START void Fxu_MatrixPrint(FILE *pFile, Fxu_Matrix *p)
DECLARATIONS ///.
#define Fxu_MatrixForEachCube(Matrix, Cube)
typedefABC_NAMESPACE_HEADER_START struct FxuMatrix Fxu_Matrix
INCLUDES ///.
#define Fxu_MatrixForEachDouble(Matrix, Div, Index)
#define Fxu_CubeForEachPair(pCube, pPair, i)