50 for ( i = 0; i <=
p->nSupp; i++ )
52 p->pPlanes[i].statsCost =
p->pPlanes[i].statsNodes;
53 Total +=
p->pPlanes[i].statsNodes;
55 assert( Total ==
p->nNodesCur );
56 p->nNodesBeg =
p->nNodesCur;
86 for ( i = 0; i <
p->nSupp; i++ )
87 for ( pUnit =
p->pPlanes[i].pHead; pUnit; pUnit = pUnit->
Next )
93 for ( i = 0; i <
p->nTops; i++ )
99 for ( i = 0; i <
p->nSupp; i++ )
101 p->pPlanes[i].statsCost = 0.0;
102 for ( pUnit =
p->pPlanes[i].pHead; pUnit; pUnit = pUnit->
Next )
106 Half = 0.5 * pUnit->
Weight;
110 p->pPlanes[i].statsCost += pUnit->
Weight;
112 Res +=
p->pPlanes[i].statsCost;
114 p->pPlanes[
p->nSupp].statsCost = 0.0;
115 p->nAplBeg =
p->nAplCur = Res;
140 memset( pWidthStart, 0,
sizeof(
int) * (
p->nSupp + 1) );
141 memset( pWidthStop, 0,
sizeof(
int) * (
p->nSupp + 1) );
144 for ( v = 0; v <=
p->nSupp; v++ )
145 for ( pUnit =
p->pPlanes[v].pHead; pUnit; pUnit = pUnit->
Next )
152 for ( v = 0; v <
p->nTops; v++ )
159 pWidthStart[pUnit->
TopRef]++;
162 pWidthStop[pUnit->
lev+1]++;
166 for ( v = 0; v <
p->nSupp; v++ )
167 for ( pUnit =
p->pPlanes[v].pHead; pUnit; pUnit = pUnit->
Next )
176 pWidthStop[pUnit->
pE->
lev+1]++;
185 pWidthStop[pUnit->
pT->
lev+1]++;
190 for ( v = 0; v <
p->nSupp; v++ )
195 for ( v = 0; v <=
p->nSupp; v++ )
198 p->pPlanes[v].statsWidth = pWidthStart[v] - pWidthStop[v];
200 p->pPlanes[v].statsWidth =
p->pPlanes[v-1].statsWidth + pWidthStart[v] - pWidthStop[v];
201 p->pPlanes[v].statsCost =
p->pPlanes[v].statsWidth;
202 p->nWidthCur +=
p->pPlanes[v].statsWidth;
203 printf(
"Level %2d: Width = %5d.\n", v,
p->pPlanes[v].statsWidth );
205 p->nWidthBeg =
p->nWidthCur;
228 for ( i = 0; i <=
p->nSupp; i++ )
229 p->pPlanes[i].statsWidth = 0;
232 for ( v = 0; v <=
p->nSupp; v++ )
233 for ( pUnit =
p->pPlanes[v].pHead; pUnit; pUnit = pUnit->
Next )
240 for ( i = 0; i <
p->nTops; i++ )
244 for ( i = 0; i <
p->nSupp; i++ )
245 for ( pUnit =
p->pPlanes[i].pHead; pUnit; pUnit = pUnit->
Next )
254 for ( i = 0; i <
p->nSupp; i++ )
258 for ( i = 0; i <
p->nSupp; i++ )
259 for ( pUnit =
p->pPlanes[i].pHead; pUnit; pUnit = pUnit->
Next )
260 for ( v = pUnit->
TopRef; v <= pUnit->lev; v++ )
261 p->pPlanes[v].statsWidth++;
264 for ( pUnit =
p->pPlanes[
p->nSupp].pHead; pUnit; pUnit = pUnit->
Next )
265 for ( v = pUnit->
TopRef; v <= p->nSupp; v++ )
266 p->pPlanes[v].statsWidth++;
270 for ( i = 0; i <=
p->nSupp; i++ )
272 p->pPlanes[i].statsCost =
p->pPlanes[i].statsWidth;
273 p->nWidthCur +=
p->pPlanes[i].statsWidth;
275 p->nWidthBeg =
p->nWidthCur;
291 printf(
"NODES: Total = %6d. Average = %6.2f.\n",
p->nNodesCur,
p->nNodesCur / (
float)
p->nSupp );
307 printf(
"APL: Total = %8.2f. Average =%6.2f.\n",
p->nAplCur,
p->nAplCur / (
float)
p->nSupp );
329 for ( i = 0; i <=
p->nSupp; i++ )
331 printf(
"Level = %2d. Width = %3d.\n", i,
p->pPlanes[i].statsWidth );
332 if ( WidthMax < p->pPlanes[i].statsWidth )
333 WidthMax =
p->pPlanes[i].statsWidth;
334 TotalWidth +=
p->pPlanes[i].statsWidth;
336 assert(
p->nWidthCur == TotalWidth );
338 printf(
"Maximum = %5d. ", WidthMax );
339 printf(
"Total = %7d. ",
p->nWidthCur );
340 printf(
"Average = %6.2f.\n", TotalWidth / (
float)
p->nSupp );
357 for ( pUnit = pPlane->
pHead; pUnit; pUnit = pUnit->
Next )
#define ABC_ALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START void reoProfileNodesStart(reo_man *p)
DECLARATIONS ///.
void reoProfileWidthVerifyLevel(reo_plane *pPlane, int Level)
void reoProfileWidthStart(reo_man *p)
void reoProfileWidthStart2(reo_man *p)
void reoProfileAplPrint(reo_man *p)
void reoProfileWidthPrint(reo_man *p)
void reoProfileAplStart(reo_man *p)
void reoProfileNodesPrint(reo_man *p)
struct _reo_plane reo_plane
struct _reo_unit reo_unit
DATA STRUCTURES ///.