Changeset 436:6d632cb56ea3 in lemon-0.x for src/work
- Timestamp:
- 04/27/04 11:40:25 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@584
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/list_graph.h
r409 r436 369 369 /* stream operations, for testing purpose */ 370 370 371 friend std::ostream& operator<<(std::ostream& os, const Node& i) {372 if (i.valid())373 os << i.node->id;374 else375 os << "invalid";376 return os;377 }378 friend std::ostream& operator<<(std::ostream& os, const Edge& i) {379 if (i.valid())380 os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")";381 else382 os << "invalid";383 return os;384 }371 // friend std::ostream& operator<<(std::ostream& os, const Node& i) { 372 // if (i.valid()) 373 // os << i.node->id; 374 // else 375 // os << "invalid"; 376 // return os; 377 // } 378 // friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 379 // if (i.valid()) 380 // os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 381 // else 382 // os << "invalid"; 383 // return os; 384 // } 385 385 386 386 class Node { … … 547 547 }; 548 548 549 std::ostream& operator<<(std::ostream& os, const ListGraph::Node& i) { 550 if (i.valid()) 551 os << i.node->id; 552 else 553 os << "invalid"; 554 return os; 555 } 556 std::ostream& operator<<(std::ostream& os, const ListGraph::Edge& i) { 557 if (i.valid()) 558 os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 559 else 560 os << "invalid"; 561 return os; 562 } 563 549 564 class UndirListGraph : public ListGraph { 550 565 public:
Note: See TracChangeset
for help on using the changeset viewer.