src/work/peter/edgepathgraph_test.cc
changeset 1241 dadc9987c537
parent 921 818510fa3d99
equal deleted inserted replaced
1:e832f1ede965 2:50c1b6668e86
   133       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
   133       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
   134       {
   134       {
   135 	typedef DPath::EdgeIt PEdgeIt;
   135 	typedef DPath::EdgeIt PEdgeIt;
   136 	PEdgeIt f;
   136 	PEdgeIt f;
   137 
   137 
   138 	cout << "Edge " << EPGr.id(EPGr.tail(e)) << " - " << EPGr.id(EPGr.head(e)) << " in actual layer is";
   138 	cout << "Edge " << EPGr.id(EPGr.source(e)) << " - " << EPGr.id(EPGr.target(e)) << " in actual layer is";
   139         if(EPGr.edgepath[e])
   139         if(EPGr.edgepath[e])
   140 	{
   140 	{
   141 	  cout << endl << "Path";
   141 	  cout << endl << "Path";
   142 	  for(EPGr.edgepath[e]->first(f); EPGr.edgepath[e]->valid(f); EPGr.edgepath[e]->next(f))
   142 	  for(EPGr.edgepath[e]->first(f); EPGr.edgepath[e]->valid(f); EPGr.edgepath[e]->next(f))
   143 	  {
   143 	  {
   144 	    cout << " " << EPGr2.id(EPGr2.tail(f)) << "-" << EPGr2.id(EPGr2.head(f));
   144 	    cout << " " << EPGr2.id(EPGr2.source(f)) << "-" << EPGr2.id(EPGr2.target(f));
   145 	  }
   145 	  }
   146 	  //cout << EPGr2.id(EPGr2.head(f)) << endl;
   146 	  //cout << EPGr2.id(EPGr2.target(f)) << endl;
   147 	  cout << endl;
   147 	  cout << endl;
   148 	}
   148 	}
   149 	else
   149 	else
   150 	{
   150 	{
   151 	  cout << " itself." <<endl;
   151 	  cout << " itself." <<endl;
   167       cout << "EdgeMaps before addMap:" << endl;
   167       cout << "EdgeMaps before addMap:" << endl;
   168     
   168     
   169       cout << "actlaymap: ";
   169       cout << "actlaymap: ";
   170       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
   170       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
   171       {
   171       {
   172 	cout << EPGr.id(EPGr.tail(e)) << "-" << EPGr.id(EPGr.head(e)) << ":" << actlaymap[e] << " ";
   172 	cout << EPGr.id(EPGr.source(e)) << "-" << EPGr.id(EPGr.target(e)) << ":" << actlaymap[e] << " ";
   173       }
   173       }
   174       cout << endl;
   174       cout << endl;
   175       cout << "sublaymap: ";
   175       cout << "sublaymap: ";
   176       for(ListGraph::EdgeIt e(EPGr2.actuallayer);EPGr2.actuallayer.valid(e);EPGr2.actuallayer.next(e))
   176       for(ListGraph::EdgeIt e(EPGr2.actuallayer);EPGr2.actuallayer.valid(e);EPGr2.actuallayer.next(e))
   177       {
   177       {
   178 	cout << EPGr2.id(EPGr2.tail(e)) << "-" << EPGr2.id(EPGr2.head(e)) << ":" << sublaymap[e] << " ";
   178 	cout << EPGr2.id(EPGr2.source(e)) << "-" << EPGr2.id(EPGr2.target(e)) << ":" << sublaymap[e] << " ";
   179       }
   179       }
   180       cout << endl;
   180       cout << endl;
   181       //EdgeMap-ok kiirasa#vege
   181       //EdgeMap-ok kiirasa#vege
   182 
   182 
   183       
   183       
   188       cout << "EdgeMaps after addMap:" << endl;
   188       cout << "EdgeMaps after addMap:" << endl;
   189     
   189     
   190       cout << "actlaymap: ";
   190       cout << "actlaymap: ";
   191       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
   191       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
   192       {
   192       {
   193 	cout << EPGr.id(EPGr.tail(e)) << "-" << EPGr.id(EPGr.head(e)) << ":" << actlaymap[e] << " ";
   193 	cout << EPGr.id(EPGr.source(e)) << "-" << EPGr.id(EPGr.target(e)) << ":" << actlaymap[e] << " ";
   194       }
   194       }
   195       cout << endl;
   195       cout << endl;
   196       cout << "sublaymap: ";
   196       cout << "sublaymap: ";
   197       for(ListGraph::EdgeIt e(EPGr2.actuallayer);EPGr2.actuallayer.valid(e);EPGr2.actuallayer.next(e))
   197       for(ListGraph::EdgeIt e(EPGr2.actuallayer);EPGr2.actuallayer.valid(e);EPGr2.actuallayer.next(e))
   198       {
   198       {
   199 	cout << EPGr2.id(EPGr2.tail(e)) << "-" << EPGr2.id(EPGr2.head(e)) << ":" << sublaymap[e] << " ";
   199 	cout << EPGr2.id(EPGr2.source(e)) << "-" << EPGr2.id(EPGr2.target(e)) << ":" << sublaymap[e] << " ";
   200       }
   200       }
   201       cout << endl;
   201       cout << endl;
   202       //EdgeMap-ok kiirasa#vege
   202       //EdgeMap-ok kiirasa#vege
   203     
   203     
   204     
   204