Changeset 813:65144c52969c in lemon0.x for src/hugo/list_graph.h
 Timestamp:
 09/07/04 12:35:31 (19 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1109
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/hugo/list_graph.h
r798 r813 94 94 first_free_edge(_g.first_free_edge) {} 95 95 96 int nodeNum() const { return nodes.size(); } //FIXME: What is this? 97 int edgeNum() const { return edges.size(); } //FIXME: What is this? 98 99 ///Set the expected number of edges 96 ///Number of nodes. 97 int nodeNum() const { return nodes.size(); } 98 ///Number of edges. 99 int edgeNum() const { return edges.size(); } 100 101 ///Set the expected maximum number of edges. 100 102 101 103 ///With this function, it is possible to set the expected number of edges. … … 104 106 void reserveEdge(int n) { edges.reserve(n); }; 105 107 106 ///\bug This function does something different than 107 ///its name would suggests... 108 int maxNodeId() const { return nodes.size(); } //FIXME: What is this? 109 ///\bug This function does something different than 110 ///its name would suggests... 111 int maxEdgeId() const { return edges.size(); } //FIXME: What is this? 108 /// Maximum node ID. 109 110 /// Maximum node ID. 111 ///\sa id(Node) 112 int maxNodeId() const { return nodes.size()1; } 113 /// Maximum edge ID. 114 115 /// Maximum edge ID. 116 ///\sa id(Edge) 117 int maxEdgeId() const { return edges.size()1; } 112 118 113 119 Node tail(Edge e) const { return edges[e.n].tail; } … … 123 129 e=InEdgeIt(*this,v); return e; } 124 130 131 /// Node ID. 132 133 /// The ID of a valid Node is a nonnegative integer not greater than 134 /// \ref maxNodeId(). The range of the ID's is not surely continuous 135 /// and the greatest node ID can be actually less then \ref maxNodeId(). 136 /// 137 /// The ID of the \ref INVALID node is 1. 138 ///\return The ID of the node \c v. 125 139 static int id(Node v) { return v.n; } 140 /// Edge ID. 141 142 /// The ID of a valid Edge is a nonnegative integer not greater than 143 /// \ref maxEdgeId(). The range of the ID's is not surely continuous 144 /// and the greatest edge ID can be actually less then \ref maxEdgeId(). 145 /// 146 /// The ID of the \ref INVALID edge is 1. 147 ///\return The ID of the edge \c e. 126 148 static int id(Edge e) { return e.n; } 127 149 128 150 /// Adds a new node to the graph. 129 151 130 /// \ todo It adds the nodes in a reversed order.152 /// \warning It adds the new node to the front of the list. 131 153 /// (i.e. the lastly added node becomes the first.) 132 154 Node addNode() { … … 521 543 first_free_node(_g.first_free_node) {} 522 544 523 int nodeNum() const { return nodes.size(); } //FIXME: What is this? 524 int edgeNum() const { return 0; } //FIXME: What is this? 525 526 ///\bug This function does something different than 527 ///its name would suggests... 528 int maxNodeId() const { return nodes.size(); } //FIXME: What is this? 529 ///\bug This function does something different than 530 ///its name would suggests... 531 int maxEdgeId() const { return 0; } //FIXME: What is this? 545 ///Number of nodes. 546 int nodeNum() const { return nodes.size(); } 547 ///Number of edges. 548 int edgeNum() const { return 0; } 549 550 /// Maximum node ID. 551 552 /// Maximum node ID. 553 ///\sa id(Node) 554 int maxNodeId() const { return nodes.size()1; } 555 /// Maximum edge ID. 556 557 /// Maximum edge ID. 558 ///\sa id(Edge) 559 int maxEdgeId() const { return 0; } 532 560 533 561 Node tail(Edge e) const { return INVALID; } … … 543 571 e=InEdgeIt(*this,v); return e; } 544 572 573 /// Node ID. 574 575 /// The ID of a valid Node is a nonnegative integer not greater than 576 /// \ref maxNodeId(). The range of the ID's is not surely continuous 577 /// and the greatest node ID can be actually less then \ref maxNodeId(). 578 /// 579 /// The ID of the \ref INVALID node is 1. 580 ///\return The ID of the node \c v. 545 581 int id(Node v) const { return v.n; } 582 /// Edge ID. 583 584 /// The ID of a valid Edge is a nonnegative integer not greater than 585 /// \ref maxEdgeId(). The range of the ID's is not surely continuous 586 /// and the greatest edge ID can be actually less then \ref maxEdgeId(). 587 /// 588 /// The ID of the \ref INVALID edge is 1. 589 ///\return The ID of the edge \c e. 546 590 int id(Edge e) const { return 1; } 547 591 548 592 /// Adds a new node to the graph. 549 593 550 /// \ todo It adds the nodes in a reversed order.594 /// \warning It adds the new node to the front of the list. 551 595 /// (i.e. the lastly added node becomes the first.) 552 596 Node addNode() { … … 828 872 first_free_edge(_g.first_free_edge) {} 829 873 830 int nodeNum() const { return G.nodeNum(); } //FIXME: What is this? 831 int edgeNum() const { return edges.size(); } //FIXME: What is this? 832 833 ///\bug This function does something different than 834 ///its name would suggests... 835 int maxNodeId() const { return G.maxNodeId(); } //FIXME: What is this? 836 ///\bug This function does something different than 837 ///its name would suggests... 838 int maxEdgeId() const { return edges.size(); } //FIXME: What is this? 874 ///Number of nodes. 875 int nodeNum() const { return G.nodeNum(); } 876 ///Number of edges. 877 int edgeNum() const { return edges.size(); } 878 879 /// Maximum node ID. 880 881 /// Maximum node ID. 882 ///\sa id(Node) 883 int maxNodeId() const { return G.maxNodeId(); } 884 /// Maximum edge ID. 885 886 /// Maximum edge ID. 887 ///\sa id(Edge) 888 int maxEdgeId() const { return edges.size()1; } 839 889 840 890 Node tail(Edge e) const { return edges[e.n].tail; } … … 850 900 e=InEdgeIt(*this,v); return e; } 851 901 902 /// Node ID. 903 904 /// The ID of a valid Node is a nonnegative integer not greater than 905 /// \ref maxNodeId(). The range of the ID's is not surely continuous 906 /// and the greatest node ID can be actually less then \ref maxNodeId(). 907 /// 908 /// The ID of the \ref INVALID node is 1. 909 ///\return The ID of the node \c v. 910 int id(Node v) { return G.id(v); } 911 /// Edge ID. 912 913 /// The ID of a valid Edge is a nonnegative integer not greater than 914 /// \ref maxEdgeId(). The range of the ID's is not surely continuous 915 /// and the greatest edge ID can be actually less then \ref maxEdgeId(). 916 /// 917 /// The ID of the \ref INVALID edge is 1. 918 ///\return The ID of the edge \c e. 852 919 int id(Edge e) const { return e.n; } 853 920
Note: See TracChangeset
for help on using the changeset viewer.