Changeset 1115:444f69240539 in lemon-0.x
- Timestamp:
- 02/01/05 16:56:37 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1514
- Location:
- src/work/deba
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/deba/graph_io_test.cc
r1037 r1115 19 19 20 20 SmartGraph::NodeMap<int> id(graph); 21 reader. readNodeMap("id", id);21 reader.addNodeMap("id", id); 22 22 23 23 SmartGraph::NodeMap<int> cost(graph); 24 reader. readNodeMap("cost", cost);24 reader.addNodeMap("cost", cost); 25 25 26 26 SmartGraph::NodeMap<string> color(graph); 27 reader. readNodeMap("color", color);27 reader.addNodeMap("color", color); 28 28 29 29 SmartGraph::NodeMap<string> description(graph); 30 reader. readNodeMap<QuotedStringReader>("description", description);30 reader.addNodeMap<QuotedStringReader>("description", description); 31 31 32 32 SmartGraph::EdgeMap<char> mmap(graph); 33 reader. readEdgeMap("mmap", mmap);33 reader.addEdgeMap("mmap", mmap); 34 34 35 35 reader.skipEdgeMap<QuotedStringReader>("description"); 36 36 37 37 SmartGraph::Node source; 38 reader. readNode("source", source);38 reader.addNode("source", source); 39 39 40 40 SmartGraph::Edge newedge; 41 reader. readEdge("newedge", newedge);41 reader.addEdge("newedge", newedge); 42 42 43 43 try { … … 48 48 cerr << e.what() << endl; 49 49 } 50 50 51 for (SmartGraph::NodeIt it(graph); it != INVALID; ++it) { 51 52 cout << cost[it] << ' ' << color[it] << ' ' << description[it] << endl; … … 53 54 54 55 for (SmartGraph::EdgeIt it(graph); it != INVALID; ++it) { 55 cout << mmap[it] << ' ' << id[graph.source(it)] << ' ' << id[graph.target(it)] << endl; 56 cout << mmap[it] << ' ' << id[graph.source(it)] << ' ' << 57 id[graph.target(it)] << endl; 56 58 } 57 59 58 cout << id[source] << ' ' << cost[source] << ' ' << color[source] << ' ' << description[source] << endl; 59 cout << mmap[newedge] << ' ' << id[graph.source(newedge)] << ' ' << id[graph.target(newedge)] << endl; 60 cout << id[source] << ' ' << cost[source] << ' ' << 61 color[source] << ' ' << description[source] << endl; 62 cout << mmap[newedge] << ' ' << id[graph.source(newedge)] << 63 ' ' << id[graph.target(newedge)] << endl; 60 64 61 65 ofstream output("copy.lgf"); 62 66 GraphWriter<SmartGraph> writer(output, graph); 63 67 64 DescriptorMap<SmartGraph, SmartGraph::Node, SmartGraph::NodeIt, SmartGraph::NodeMap<int> > node_ids(graph); 68 DescriptorMap<SmartGraph, SmartGraph::Node, SmartGraph::NodeMap<int> > 69 node_ids(graph); 65 70 66 writer. writeNodeMap("id", node_ids);67 writer. writeNodeMap<QuotedStringWriter>("format", description);71 writer.addNodeMap("id", node_ids); 72 writer.addNodeMap<QuotedStringWriter>("format", description); 68 73 69 DescriptorMap<SmartGraph, SmartGraph::Edge, SmartGraph::EdgeIt, SmartGraph::EdgeMap<int>> edge_ids(graph);74 IdMap<SmartGraph, SmartGraph::Edge > edge_ids(graph); 70 75 71 writer. writeEdgeMap("id", edge_ids);72 writer. writeEdgeMap("chars", mmap);76 writer.addEdgeMap("id", edge_ids); 77 writer.addEdgeMap("chars", mmap); 73 78 74 writer. writeNode("source", node_ids.inverse()[3]);75 writer.writeEdge("elek", edge_ids.inverse()[6]);79 writer.addNode("source", node_ids.inverse()[3]); 80 // writer.addEdge("elek", edge_ids.inverse()[6]); 76 81 writer.write(); 77 82 -
src/work/deba/graph_reader.h
r1037 r1115 38 38 class IOException { 39 39 public: 40 virtual ~IOException() {} 40 41 virtual string what() const = 0; 41 42 }; … … 56 57 typedef _Exception Exception; 57 58 StreamException(int _line, Exception _exception) 58 : line_num(_line), Exception(_exception) {}59 : Exception(_exception), line_num(_line) {} 59 60 virtual int line() const { 60 61 return line_num; 61 62 } 63 64 virtual ~StreamException() {} 65 62 66 virtual std::string what() const { 63 67 ostringstream os; … … 71 75 72 76 // Readers and ReaderTraits 73 77 /// \brief Standard ReaderTraits for the GraphReader class. 78 /// 79 /// 80 74 81 struct DefaultReaderTraits { 75 82 … … 97 104 value.clear(); 98 105 is >> ws; 99 if (!is.get(c) || c != '\"') throw DataFormatException("Quoted string format"); 106 if (!is.get(c) || c != '\"') 107 throw DataFormatException("Quoted string format"); 100 108 while (is.get(c) && c != '\"') { 101 109 if (escaped && c == '\\') { … … 193 201 typedef typename ReaderTraits::DefaultReader DefaultReader; 194 202 195 GraphReader(std::istream& _is, Graph& _graph, const DefaultReader& _reader = DefaultReader()) 203 GraphReader(std::istream& _is, Graph& _graph, 204 const DefaultReader& _reader = DefaultReader()) 196 205 : is(_is), graph(_graph), nodeSkipper(_reader), edgeSkipper(_reader) {} 197 206 … … 199 208 ~GraphReader() { 200 209 201 for (typename NodeMapReaders::iterator it = node_map_readers.begin(); it != node_map_readers.end(); ++it) { 210 for (typename NodeMapReaders::iterator it = node_map_readers.begin(); 211 it != node_map_readers.end(); ++it) { 202 212 delete it->second; 203 213 } 204 214 205 for (typename EdgeMapReaders::iterator it = edge_map_readers.begin(); it != edge_map_readers.end(); ++it) { 215 for (typename EdgeMapReaders::iterator it = edge_map_readers.begin(); 216 it != edge_map_readers.end(); ++it) { 206 217 delete it->second; 207 218 } … … 212 223 213 224 template <typename Map> 214 GraphReader& readNodeMap(std::string name, Map& map) { 215 return readNodeMap<typename ReaderTraits::template Reader<typename Map::Value>, Map>(name, map); 225 GraphReader& addNodeMap(std::string name, Map& map) { 226 return addNodeMap<typename ReaderTraits::template 227 Reader<typename Map::Value>, Map>(name, map); 216 228 } 217 229 218 230 template <typename Reader, typename Map> 219 GraphReader& readNodeMap(std::string name, Map& map, const Reader& reader = Reader()) { 231 GraphReader& addNodeMap(std::string name, Map& map, 232 const Reader& reader = Reader()) { 220 233 if (node_map_readers.find(name) != node_map_readers.end()) { 221 234 throw Exception() << "Multiple read rule for node map: " << name; 222 235 } 223 node_map_readers.insert(make_pair(name, new MapReader<Node, Map, Reader>(map, reader))); 236 node_map_readers.insert( 237 make_pair(name, new MapReader<Node, Map, Reader>(map, reader))); 224 238 return *this; 225 239 } 226 240 227 241 template <typename Reader> 228 GraphReader& skipNodeMap(std::string name, const Reader& reader = Reader()) { 242 GraphReader& skipNodeMap(std::string name, 243 const Reader& reader = Reader()) { 229 244 if (node_map_readers.find(name) != node_map_readers.end()) { 230 245 throw Exception() << "Multiple read rule for node map: " << name; 231 246 } 232 node_map_readers.insert(make_pair(name, new SkipReader<Node, Reader>(reader))); 247 node_map_readers.insert( 248 make_pair(name, new SkipReader<Node, Reader>(reader))); 233 249 return *this; 234 250 } … … 237 253 238 254 template <typename Map> 239 GraphReader& readEdgeMap(std::string name, Map& map) { 240 return readEdgeMap<typename ReaderTraits::template Reader<typename Map::Value>, Map>(name, map); 255 GraphReader& addEdgeMap(std::string name, Map& map) { 256 return addEdgeMap<typename ReaderTraits::template 257 Reader<typename Map::Value>, Map>(name, map); 241 258 } 242 259 243 260 244 261 template <typename Reader, typename Map> 245 GraphReader& readEdgeMap(std::string name, Map& map, const Reader& reader = Reader()) { 262 GraphReader& addEdgeMap(std::string name, Map& map, 263 const Reader& reader = Reader()) { 246 264 if (edge_map_readers.find(name) != edge_map_readers.end()) { 247 265 throw Exception() << "Multiple read rule for edge map: " << name; 248 266 } 249 edge_map_readers.insert(make_pair(name, new MapReader<Edge, Map, Reader>(map, reader))); 267 edge_map_readers.insert( 268 make_pair(name, new MapReader<Edge, Map, Reader>(map, reader))); 250 269 return *this; 251 270 } 252 271 253 272 template <typename Reader> 254 GraphReader& skipEdgeMap(std::string name, const Reader& reader = Reader()) { 273 GraphReader& skipEdgeMap(std::string name, 274 const Reader& reader = Reader()) { 255 275 if (edge_map_readers.find(name) != edge_map_readers.end()) { 256 276 throw Exception() << "Multiple read rule for edge map: " << name; 257 277 } 258 edge_map_readers.insert(make_pair(name, new SkipReader<Edge, Reader>(reader))); 278 edge_map_readers.insert( 279 make_pair(name, new SkipReader<Edge, Reader>(reader))); 259 280 return *this; 260 281 } 261 282 262 283 // Node rules 263 GraphReader& readNode(std::string name, Node& node) {284 GraphReader& addNode(std::string name, Node& node) { 264 285 if (node_readers.find(name) != node_readers.end()) { 265 286 throw Exception() << "Multiple read rule for node"; 266 287 } 267 288 node_readers.insert(make_pair(name, &node)); 289 return *this; 268 290 } 269 291 270 292 // Edge rules 271 293 272 GraphReader& readEdge(std::string name, Edge& edge) {294 GraphReader& addEdge(std::string name, Edge& edge) { 273 295 if (edge_readers.find(name) != edge_readers.end()) { 274 296 throw Exception() << "Multiple read rule for edge"; 275 297 } 276 298 edge_readers.insert(make_pair(name, &edge)); 299 return *this; 277 300 } 278 301 … … 307 330 template <typename Item> class InverterBase; 308 331 309 std::string readNodeSet(int& line_num, auto_ptr<InverterBase<Node> > & nodeInverter) { 332 std::string readNodeSet(int& line_num, 333 auto_ptr<InverterBase<Node> > & nodeInverter) { 310 334 std::vector<ReaderBase<Node>* > index; 311 335 { … … 335 359 std::istringstream ls(line); 336 360 nodeInverter->read(ls, node); 337 for (int i = 1; i < index.size(); ++i) {361 for (int i = 1; i < (int)index.size(); ++i) { 338 362 index[i]->read(ls, node); 339 363 } … … 343 367 344 368 std::string readEdgeSet(int& line_num, 345 auto_ptr<InverterBase<Edge> > & edgeInverter, auto_ptr<InverterBase<Node> > & nodeInverter) { 369 auto_ptr<InverterBase<Edge> > & edgeInverter, 370 auto_ptr<InverterBase<Node> > & nodeInverter) { 346 371 std::vector<ReaderBase<Edge>*> index; 347 372 { … … 373 398 Edge edge = graph.addEdge(source, target); 374 399 edgeInverter->read(ls, edge); 375 for (int i = 1; i < index.size(); ++i) {400 for (int i = 1; i < (int)index.size(); ++i) { 376 401 index[i]->read(ls, edge); 377 402 } … … 380 405 } 381 406 382 std::string readNodes(int& line_num, auto_ptr<InverterBase<Node> >& nodeInverter) { 407 std::string readNodes(int& line_num, 408 auto_ptr<InverterBase<Node> >& nodeInverter) { 383 409 std::string line; 384 410 while (line = readNotEmptyLine(is, line_num), line[0] != '@') { … … 394 420 } 395 421 396 std::string readEdges(int& line_num, auto_ptr<InverterBase<Edge> >& edgeInverter) { 422 std::string readEdges(int& line_num, 423 auto_ptr<InverterBase<Edge> >& edgeInverter) { 397 424 std::string line; 398 425 while (line = readNotEmptyLine(is, line_num), line[0] != '@') { … … 412 439 while (++line_num, getline(is, line)) { 413 440 int vi = line.find_first_not_of(" \t"); 414 if (vi != string::npos && line[vi] != '#') {441 if (vi != (int)string::npos && line[vi] != '#') { 415 442 return line.substr(vi); 416 443 } … … 446 473 : map(_map), reader(_reader) {} 447 474 475 virtual ~MapReaderInverter() {} 476 448 477 virtual void read(std::istream& is, const Item& item) { 449 478 Value value; … … 483 512 : reader(_reader) {} 484 513 514 virtual ~SkipReaderInverter() {} 515 485 516 virtual void read(std::istream& is, const Item& item) { 486 517 Value value; … … 514 545 public: 515 546 typedef _Item Item; 547 548 // virtual ~ReaderBase() {} 516 549 517 550 virtual void read(std::istream& is, const Item& item) = 0; … … 533 566 : map(_map), reader(_reader) {} 534 567 568 virtual ~MapReader() {} 535 569 536 570 virtual void read(std::istream& is, const Item& item) { … … 556 590 SkipReader(const Reader& _reader) : reader(_reader) {} 557 591 592 virtual ~SkipReader() {} 593 558 594 virtual void read(std::istream& is, const Item& item) { 559 595 Value value; -
src/work/deba/graph_writer.h
r1037 r1115 55 55 56 56 void write(std::ostream& os, const std::string& value) { 57 char c;58 57 os << "\""; 59 58 if (escaped) { 60 59 ostringstream ls; 61 for (int i = 0; i < value.size(); ++i) {60 for (int i = 0; i < (int)value.size(); ++i) { 62 61 writeEscape(ls, value[i]); 63 62 } … … 137 136 138 137 ~GraphWriter() { 139 140 for (typename NodeMapWriters::iterator it = node_map_writers.begin();it != node_map_writers.end(); ++it) {138 for (typename NodeMapWriters::iterator it = node_map_writers.begin(); 139 it != node_map_writers.end(); ++it) { 141 140 delete it->second; 142 141 } 143 142 144 for (typename EdgeMapWriters::iterator it = edge_map_writers.begin(); it != edge_map_writers.end(); ++it) { 143 for (typename EdgeMapWriters::iterator it = edge_map_writers.begin(); 144 it != edge_map_writers.end(); ++it) { 145 145 delete it->second; 146 146 } … … 151 151 152 152 template <typename Map> 153 GraphWriter& writeNodeMap(std::string name, const Map& map) { 154 return writeNodeMap<typename WriterTraits::template Writer<typename Map::Value>, Map>(name, map); 153 GraphWriter& addNodeMap(std::string name, const Map& map) { 154 return addNodeMap<typename WriterTraits::template Writer< 155 typename Map::Value>, Map>(name, map); 155 156 } 156 157 157 158 template <typename Writer, typename Map> 158 GraphWriter& writeNodeMap(std::string name, const Map& map, const Writer& writer = Writer()) { 159 GraphWriter& addNodeMap(std::string name, const Map& map, 160 const Writer& writer = Writer()) { 159 161 // if (node_map_writers.find(name) != node_map_writers.end()) { 160 // throw Exception() << "Multiple write rule for node map: " << name; 162 // throw Exception() << "Multiple write rule for node map: " 163 // << name; 161 164 // } 162 node_map_writers.push_back(make_pair(name, new MapWriter<Node, Map, Writer>(map, writer))); 165 node_map_writers.push_back( 166 make_pair(name, new MapWriter<Node, Map, Writer>(map, writer))); 163 167 return *this; 164 168 } … … 167 171 168 172 template <typename Map> 169 GraphWriter& writeEdgeMap(std::string name, const Map& map) {170 return writeEdgeMap<typename WriterTraits::template Writer<typename Map::Value>, Map>(name, map);173 GraphWriter& addEdgeMap(std::string name, const Map& map) { 174 return addEdgeMap<typename WriterTraits::template Writer<typename Map::Value>, Map>(name, map); 171 175 } 172 176 173 177 174 178 template <typename Writer, typename Map> 175 GraphWriter& writeEdgeMap(std::string name, const Map& map, const Writer& writer = Writer()) {179 GraphWriter& addEdgeMap(std::string name, const Map& map, const Writer& writer = Writer()) { 176 180 // if (edge_map_writers.find(name) != edge_map_writers.end()) { 177 181 // throw Exception() << "Multiple write rule for edge map: " << name; … … 182 186 183 187 // Node rules 184 GraphWriter& writeNode(std::string name, const Node& node) {188 GraphWriter& addNode(std::string name, const Node& node) { 185 189 // if (node_writers.find(name) != node_writers.end()) { 186 190 // throw Exception() << "Multiple write rule for node"; 187 191 // } 188 192 node_writers.push_back(make_pair(name, node)); 193 return *this; 189 194 } 190 195 191 196 // Edge rules 192 197 193 GraphWriter& writeEdge(std::string name, const Edge& edge) {198 GraphWriter& addEdge(std::string name, const Edge& edge) { 194 199 // if (edge_writers.find(name) != edge_writers.end()) { 195 200 // throw Exception() << "Multiple write rule for edge"; 196 201 // } 197 202 edge_writers.push_back(make_pair(name, edge)); 203 return *this; 198 204 } 199 205 … … 211 217 if (node_map_writers.size() == 0) return; 212 218 os << "@nodeset" << std::endl; 213 for (int i = 0; i < node_map_writers.size(); ++i) {219 for (int i = 0; i < (int)node_map_writers.size(); ++i) { 214 220 os << node_map_writers[i].first << '\t'; 215 221 } 216 222 os << std::endl; 217 223 for (NodeIt it(graph); it != INVALID; ++it) { 218 for (int i = 0; i < node_map_writers.size(); ++i) {224 for (int i = 0; i < (int)node_map_writers.size(); ++i) { 219 225 node_map_writers[i].second->write(os, it); 220 226 } … … 231 237 os << "@edgeset" << std::endl; 232 238 os << "\t\t"; 233 for (int i = 0; i < edge_map_writers.size(); ++i) {239 for (int i = 0; i < (int)edge_map_writers.size(); ++i) { 234 240 os << edge_map_writers[i].first << '\t'; 235 241 } … … 238 244 node_map_writers[0].second->write(os, graph.source(it)); 239 245 node_map_writers[0].second->write(os, graph.target(it)); 240 for (int i = 0; i < edge_map_writers.size(); ++i) {246 for (int i = 0; i < (int)edge_map_writers.size(); ++i) { 241 247 edge_map_writers[i].second->write(os, it); 242 248 } … … 251 257 } 252 258 os << "@nodes" << std::endl; 253 for (int i = 0; i < node_writers.size(); ++i) {259 for (int i = 0; i < (int)node_writers.size(); ++i) { 254 260 os << node_writers[i].first << '\t'; 255 261 node_map_writers[0].second->write(os, node_writers[i].second); … … 264 270 } 265 271 os << "@edges" << std::endl; 266 for (int i = 0; i < edge_writers.size(); ++i) {272 for (int i = 0; i < (int)edge_writers.size(); ++i) { 267 273 os << edge_writers[i].first << '\t'; 268 274 edge_map_writers[0].second->write(os, edge_writers[i].second); … … 296 302 297 303 virtual void write(std::ostream& os, const Item& item) { 298 Value value;299 304 writer.write(os, map[item]); 300 305 } … … 304 309 305 310 306 typedef std::vector< std::pair<std::string, WriterBase<Node>*> > NodeMapWriters; 311 typedef std::vector< std::pair<std::string, WriterBase<Node>*> > 312 NodeMapWriters; 307 313 NodeMapWriters node_map_writers; 308 314 309 typedef std::vector< std::pair<std::string, WriterBase<Edge>*> > EdgeMapWriters; 315 typedef std::vector< std::pair<std::string, WriterBase<Edge>*> > 316 EdgeMapWriters; 310 317 EdgeMapWriters edge_map_writers; 311 318 -
src/work/deba/map_utils.h
r1037 r1115 15 15 */ 16 16 17 ///\ingroup gutils17 ///\ingroup mutils 18 18 ///\file 19 19 ///\brief Map utilities. … … 50 50 typedef typename _Map::ConstReference ConstReference; 51 51 52 /// Constructor.53 52 /// \brief Constructor. 53 /// 54 54 /// Construct a new InversableMap for the graph. 55 55 /// 56 56 InversableMap(const Graph& graph) : Map(graph) {} 57 57 58 /// The setter function of the map.59 60 /// It sets the map and the inverse map 58 /// \brief The setter function of the map. 59 /// 60 /// It sets the map and the inverse map to given key-value pair. 61 61 void set(const Key& key, const Value& val) { 62 62 Value oldval = Map::operator[](key); … … 96 96 97 97 98 // unique, continous, mutable 98 99 /// \brief Provides a mutable, continous and unique descriptor for each 100 /// item in the graph. 101 /// 102 /// The DescriptorMap class provides a mutable, continous and immutable 103 /// mapping for each item in the graph. 104 /// 105 /// \param _Graph The graph class the \c DescriptorMap belongs to. 106 /// \param _Item The Item is the Key of the Map. It may be Node, Edge or 107 /// UndirEdge. 108 /// \param _Map A ReadWriteMap mapping from the item type to integer. 99 109 100 110 template < 101 111 typename _Graph, 102 112 typename _Item, 103 typename _ItemIt,104 113 typename _Map 105 114 > 106 115 class DescriptorMap : protected _Map { 116 117 typedef _Item Item; 118 typedef _Map Map; 119 107 120 public: 121 /// The graph class of DescriptorMap. 108 122 typedef _Graph Graph; 109 typedef _Item Item; 110 typedef _ItemIt ItemIt; 111 typedef _Map Map; 112 113 123 124 /// The key type of DescriptorMap (Node, Edge, UndirEdge). 114 125 typedef typename _Map::Key Key; 126 /// The value type of DescriptorMap. 115 127 typedef typename _Map::Value Value; 116 128 117 typedef vector<Item> InverseMap; 118 129 typedef std::vector<Item> InverseMap; 130 131 /// \brief Constructor. 132 /// 133 /// Constructor for creating descriptor map. 119 134 DescriptorMap(const Graph& _graph) : Map(_graph) { 120 135 build(); … … 135 150 virtual void build() { 136 151 Map::build(); 137 for (ItemIt it(*Map::getGraph()); it != INVALID; ++it) { 152 Item it; 153 for (getGraph()->first(it); it != INVALID; getGraph()->next(it)) { 138 154 Map::set(it, inv_map.size()); 139 155 inv_map.push_back(it); … … 146 162 } 147 163 164 /// \brief Gives back the \e descriptor of the item. 165 /// 166 /// Gives back the mutable and unique \e descriptor of the map. 148 167 int operator[](const Item& item) const { 149 168 return Map::operator[](item); 150 169 } 151 152 170 171 /// \brief Gives back the inverse of the map. 172 /// 173 /// Gives back the inverse of the map. 153 174 const InverseMap inverse() const { 154 175 return inv_map; … … 158 179 vector<Item> inv_map; 159 180 }; 160 161 // unique, immutable => IDMap162 181 163 182 /// Provides an immutable and unique id for each item in the graph. 183 184 /// The IdMap class provides an unique and immutable mapping for each item 185 /// in the graph. 186 /// 187 template <typename _Graph, typename _Item> 188 class IdMap { 189 public: 190 typedef _Graph Graph; 191 typedef int Value; 192 typedef _Item Item; 193 194 /// \brief The class represents the inverse of the map. 195 /// 196 /// The class represents the inverse of the map. 197 /// \see inverse() 198 class InverseMap { 199 protected: 200 InverseMap(const Graph& _graph) : graph(_graph) {} 201 public: 202 /// \brief Gives back the given item by its id. 203 /// 204 /// Gives back the given item by its id. 205 /// 206 Item operator[](int id) const { return graph->fromId(id, Item());} 207 private: 208 Graph* graph; 209 }; 210 211 /// \brief Constructor. 212 /// 213 /// Constructor for creating id map. 214 IdMap(const Graph& _graph) : graph(&_graph) {} 215 216 /// \brief Gives back the \e id of the item. 217 /// 218 /// Gives back the immutable and unique \e id of the map. 219 int operator[](const Item& item) const { return graph->id(item);} 220 221 /// \brief Gives back the inverse of the map. 222 /// 223 /// Gives back the inverse of the map. 224 InverseMap inverse() const { return InverseMap(*graph);} 225 226 private: 227 const Graph* graph; 228 229 }; 230 231 164 232 165 233 }
Note: See TracChangeset
for help on using the changeset viewer.