70 for ( iCol = 0; iCol < p->
nCols; iCol++ )
73 for ( iRow = 0; iRow < p->
nRows; iRow++ )
74 if ( p->
pMatrix[iCol][iRow] == 1 )
94 for ( iRow = 0; iRow < p->
nRows; iRow++ )
97 for ( iCol = 0; iCol < p->
nCols; iCol++ )
98 if ( p->
pMatrix[iCol][iRow] == 1 )
134 int * pOrder, * pLast;
135 int i, k, fChanges, Temp;
138 for ( i = 0; i < p->
nRows; i++ )
141 for ( k = p->
nCols - 1; k >= 0; k-- )
151 for ( i = 0; i < p->
nRows - 1; i++ )
152 if ( pLast[i] > pLast[i+1] )
155 pOrder[i] = pOrder[i+1];
159 pLast[i] = pLast[i+1];
183 static char Buffer[10];
184 if ( iVar < p->nPis )
186 else if ( iVar < p->nPis + p->
nFfs )
212 for ( i = 0; i < p->
nRows; i++ )
214 iRow = pOrder ? pOrder[i] : i;
215 printf(
"%3d : ", iRow );
216 printf(
"%3d ", p->
pRowSums[iRow] );
218 for ( iCol = 0; iCol < p->
nCols; iCol++ )
219 printf(
"%c", p->
pMatrix[iCol][iRow] ?
'*' :
' ' );
238 int iVar, iGrp, iGrp1, iGrp2, Span = 0, nCutSize = 0, nCutSizeMax = 0;
241 for ( iVar = 0; iVar < p->
nRows; iVar++ )
245 for ( iGrp1 = 0; iGrp1 < p->
nCols; iGrp1++ )
246 if ( p->
pMatrix[iGrp1][iVar] == 1 )
248 for ( iGrp2 = p->
nCols - 1; iGrp2 >= 0; iGrp2-- )
249 if ( p->
pMatrix[iGrp2][iVar] == 1 )
254 Span += iGrp2 - iGrp1;
257 for ( iGrp = 0; iGrp < p->
nCols; iGrp++ )
259 for ( iVar = 0; iVar < p->
nRows; iVar++ )
260 if ( pGrp1[iVar] == iGrp )
262 if ( nCutSizeMax < nCutSize )
263 nCutSizeMax = nCutSize;
264 for ( iVar = 0; iVar < p->
nRows; iVar++ )
265 if ( pGrp2[iVar] == iGrp )
270 printf(
"[%4d x %4d] Life-span =%6.2f Max-cut =%5d\n",
273 Abc_Print( -1,
"Cut size is not zero (%d).\n", nCutSize );
302 for ( i = 0; i < nCols; i++ )
326 for ( i = 0; i < p->
nCols; i++ )
349 int i, iRow, iCol = pGrp->
Id;
350 assert( iCol >= 0 && iCol < p->nCols );
355 assert( iRow >= 0 && iRow < p->nRows );
363 assert( iRow >= 0 && iRow < p->nRows );
384 for ( i = 0; i < p->
nRows; i++ )
388 for ( k = 0; k < p->
nCols; k++ )
void Llb_MtrVerifyMatrix(Llb_Mtr_t *p)
static int Vec_PtrSize(Vec_Ptr_t *p)
void Llb_MtrRemoveSingletonRows(Llb_Mtr_t *p)
ABC_NAMESPACE_IMPL_START void Llb_MtrVerifyRowsAll(Llb_Mtr_t *p)
DECLARATIONS ///.
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
char * Llb_MtrVarName(Llb_Mtr_t *p, int iVar)
static void Abc_Print(int level, const char *format,...)
Llb_Mtr_t * Llb_MtrCreate(Llb_Man_t *p)
static int Saig_ManRegNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
void Llb_MtrAddColumn(Llb_Mtr_t *p, Llb_Grp_t *pGrp)
static int Vec_IntSize(Vec_Int_t *p)
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
void Llb_MtrPrint(Llb_Mtr_t *p, int fOrder)
#define ABC_CALLOC(type, num)
void Llb_MtrPrintMatrixStats(Llb_Mtr_t *p)
int * Llb_MtrFindVarOrder(Llb_Mtr_t *p)
static int Aig_ObjId(Aig_Obj_t *pObj)
Llb_Mtr_t * Llb_MtrAlloc(int nPis, int nFfs, int nCols, int nRows)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Llb_Man_t_ Llb_Man_t
INCLUDES ///.
void Llb_MtrFree(Llb_Mtr_t *p)
void Llb_MtrVerifyColumnsAll(Llb_Mtr_t *p)