/[ascend]/trunk/pygtk/incidencematrix.cpp
ViewVC logotype

Diff of /trunk/pygtk/incidencematrix.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1677 by jpye, Mon Dec 17 00:45:59 2007 UTC revision 1678 by jpye, Wed Dec 19 00:29:48 2007 UTC
# Line 209  IncidenceMatrix::getNumBlocks(){ Line 209  IncidenceMatrix::getNumBlocks(){
209      return bb->nblocks;      return bb->nblocks;
210  }  }
211    
 #ifdef ASC_WITH_MFGRAPH  
 /**  
     Return an MFGRAPH object containing the incidence information for the  
     local block. It is intended that this should be passed back to the python  
     layer as a SWIGed object that Python can decode. It might prove easier  
     just to write a .dot from this C++ layer however.  
   
     Further investigation has shown that GraphViz comes with its own perfectly  
     good graphing API and we should really just use that.  
 */  
 mfg::DrawGraph  
 IncidenceMatrix::getBlockGraph(const int &block) const{  
     using namespace mfg;  
     DrawGraph g;  
   
     Node *a = g.CreateNode();  
     Node *x = g.CreateNode();  
     Edge *ax = g.CreateEdge(a, x);  
     ax->Attribs()["color"] = "red";  
     Subgraph *s = g.CreateSubgraph();  
     Node *b = g.CreateNode(s);  
     b->Attribs()["style"] = "filled";  
     b->Attribs()["fillcolor"] = "green";  
     Edge *ab = g.CreateEdge(a, b);  
     return g;  
 }  
 #endif  
212    

Legend:
Removed from v.1677  
changed lines
  Added in v.1678

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22