60 for(i=-1; i<nodenbr; i++, enode++)
122 for(i=0; i<etree->
nodenbr; i++, enode++)
126 assert((enode[0].fsonnum + enode[0].sonsnbr) == etree->
nodenbr);
150 for(i=0; i<etree->
nodenbr; i++)
155 assert( (node >= 0) && (node < etree->nodenbr) );
184 for(i=0;i<etree->
nodenbr;i++) {
218 if(nodelevel > maxlevel) {
219 maxlevel = nodelevel;
260 for(i=0;i<sonsnbr;i++)
264 maxlevel = pastix_imax( max, maxlevel );
333 for (i=0; i < etree->
nodenbr; i++)
335 fprintf(stream,
"\t\"%ld\" [label=\"#%ld\\nSubtree cost: %e\\nNode cost: %e\\nNode CP: %e\"]\n",
341 if ((etree->
nodetab[i]).fathnum == -1) {
344 fprintf( stream,
"\t\"%ld\"->\"%ld\"\n",
346 (
long)((etree->
nodetab[i]).fathnum) );
349 fprintf(stream,
"}\n");
385 fprintf(stream,
"Rootnum %ld %d\n", (
long)rootnum, sonsnbr);
386 for(i=0;i<sonsnbr;i++) {
387 fprintf(stream,
" (%4ld)\n", (
long)
eTreeSonI(etree, rootnum, i));
390 for(i=0;i<sonsnbr;i++)
437 idx = (root == -1) ? idxmin : pastix_imin( root, idxmin );
444 if ( sonsnbr == 0 ) {
449 for(i=0;i<sonsnbr;i++)
491 for(i=0; i<symbmtx->
cblknbr; i++, enode++)
511 assert(totalsonsnbr == symbmtx->
cblknbr);
BEGIN_C_DECLS typedef int pastix_int_t
static eTreeNode_t * eTreeFather(const EliminTree *etree, pastix_int_t node)
Return the father of a given node.
static pastix_int_t eTreeRoot(const EliminTree *etree)
Return the root of the elimination tree.
static pastix_int_t eTreeSonI(const EliminTree *etree, pastix_int_t node, pastix_int_t i)
Return the i^{th} son of a given node.
void eTreeSetSons(EliminTree *)
Set the fsonnum fields base on the initialized sonsnbr.
void eTreeGenDot(const EliminTree *, FILE *)
Print the elimination tree in a dot file.
EliminTree * eTreeInit(pastix_int_t)
Initialize the elimination tree structure.
static void etree_SetSonsIndex(EliminTree *etree)
Set the fsonnum fields base on the initialized sonsnbr.
pastix_int_t eTreeLeavesNbr(const EliminTree *)
Compute the number of leaves.
EliminTree * eTreeBuild(const symbol_matrix_t *)
Build the elimination tree.
pastix_int_t eTreeGetLevelMinIdx(const EliminTree *, pastix_int_t, pastix_int_t, pastix_int_t)
Return the smallest index of the nodes belonging to the level lvl in the elimination tree.
void eTreePrint(const EliminTree *, FILE *, pastix_int_t)
Print the elimination tree in a human readable format.
pastix_int_t eTreeComputeLevels(EliminTree *, pastix_int_t, pastix_int_t)
Compute the number of level existing below a given node.
pastix_int_t eTreeNodeLevel(const EliminTree *, pastix_int_t)
Compute the number of level existing below a given node.
pastix_int_t eTreeLevel(const EliminTree *)
Compute the height of the elimination tree.
void eTreeExit(EliminTree *)
Free the elimination tree structure.
Node of the elimination tree.