Changeset 4:e099638ff236 in glemon-0.x for graph-displayer.cc
- Timestamp:
- 05/27/05 12:34:20 (19 years ago)
- Branch:
- gui
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@1915
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
graph-displayer.cc
r1 r4 13 13 int main(int argc, char *argv[]) 14 14 { 15 16 //initializing 17 15 18 property_strings=new std::string[PROPERTY_NUM]; 16 19 property_strings[WIDTH]="Width"; … … 35 38 CoordinatesMap cm(g); 36 39 Graph::EdgeMap<double> cap(g), map1(g), map2(g), map3(g), map4(g); 40 Graph::NodeMap<double> nodedata (g); 37 41 38 42 //we create one object to read x coordinates 39 43 //and one to read y coordinate of nodes and write them to cm NodeMap. 40 41 44 XMap <CoordinatesMap> xreader (cm); 42 45 YMap <CoordinatesMap> yreader (cm); 43 Graph::NodeMap<double> nodedata (g); 46 47 //reading in graph and its maps 44 48 45 49 std::ifstream is(argv[1]); … … 56 60 reader.run(); 57 61 62 //initializing MapStorage with the read data 63 58 64 MapStorage ms(g); 59 65 ms.addNodeMap("data",&nodedata); … … 63 69 ms.addEdgeMap("map3",&map3); 64 70 ms.addEdgeMap("map4",&map4); 71 72 //initializing GUI 65 73 66 74 Gnome::Canvas::init();
Note: See TracChangeset
for help on using the changeset viewer.