69 for ( c = 0; c < p->
nSupp; c++ )
74 for ( v = 0; v < p->
nSupp; v++ )
81 if ( CostBest < p->pPlanes[v].statsNodes )
90 assert( VarCurrent != -1 );
98 CostBest = CostCurrent;
105 if ( VarCurrent < p->nSupp/2 )
109 for ( v = 1; v <= VarCurrent; v++ )
113 for ( v = p->
nSupp - 1; v >= VarCurrent; v-- )
121 for ( q = VarCurrent-1; q >= 0; q-- )
129 if ( CostCurrent >= CostLimit )
135 if ( CostBest > CostCurrent )
137 CostBest = CostCurrent;
161 for ( ; q < p->
nSupp-1; )
167 printf(
"reoReorderSift(): Error! On the backward move, the costs are different.\n");
175 if ( CostCurrent >= CostLimit )
182 if ( CostBest >= CostCurrent )
184 CostBest = CostCurrent;
204 for ( ; q > BestQ; q-- )
210 printf(
"reoReorderSift(): Error! On the return move, the costs are different.\n" );
219 for ( v = 1; v <= VarCurrent; v++ )
223 for ( v = p->
nSupp - 1; v >= VarCurrent; v-- )
231 for ( q = VarCurrent; q < p->
nSupp-1; )
239 if ( CostCurrent >= CostLimit )
245 if ( CostBest > CostCurrent )
247 CostBest = CostCurrent;
267 for ( --q; q >= 0; q-- )
273 printf(
"reoReorderSift(): Error! On the backward move, the costs are different.\n");
281 if ( CostCurrent >= CostLimit )
288 if ( CostBest >= CostCurrent )
290 CostBest = CostCurrent;
314 for ( ; q < BestQ; q++ )
320 printf(
"reoReorderSift(): Error! On the return move, the costs are different.\n" );
337 for ( v = 0; v < p->
nSupp; v++ )
ABC_NAMESPACE_IMPL_START void reoReorderSift(reo_man *p)
DECLARATIONS ///.
for(p=first;p->value< newval;p=p->next)
void reoResizeStructures(reo_man *p, int nDdVarsMax, int nNodesMax, int nFuncs)
#define ABC_NAMESPACE_IMPL_END
double reoReorderSwapAdjacentVars(reo_man *p, int Level, int fMovingUp)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
#define REO_REORDER_LIMIT
MACRO DEFINITIONS ///.