1.1 --- a/src/hugo/full_graph.h Tue Sep 07 07:09:53 2004 +0000
1.2 +++ b/src/hugo/full_graph.h Tue Sep 07 10:35:31 2004 +0000
1.3 @@ -58,11 +58,21 @@
1.4 FullGraph(const FullGraph &_g)
1.5 : NodeNum(_g.nodeNum()), EdgeNum(NodeNum*NodeNum) { }
1.6
1.7 - int nodeNum() const { return NodeNum; } //FIXME: What is this?
1.8 - int edgeNum() const { return EdgeNum; } //FIXME: What is this?
1.9 + ///Number of nodes.
1.10 + int nodeNum() const { return NodeNum; }
1.11 + ///Number of edges.
1.12 + int edgeNum() const { return EdgeNum; }
1.13
1.14 - int maxNodeId() const { return NodeNum; } //FIXME: What is this?
1.15 - int maxEdgeId() const { return EdgeNum; } //FIXME: What is this?
1.16 + /// Maximum node ID.
1.17 +
1.18 + /// Maximum node ID.
1.19 + ///\sa id(Node)
1.20 + int maxNodeId() const { return NodeNum-1; }
1.21 + /// Maximum edge ID.
1.22 +
1.23 + /// Maximum edge ID.
1.24 + ///\sa id(Edge)
1.25 + int maxEdgeId() const { return EdgeNum-1; }
1.26
1.27 Node tail(Edge e) const { return e.n%NodeNum; }
1.28 Node head(Edge e) const { return e.n/NodeNum; }
1.29 @@ -76,7 +86,23 @@
1.30 InEdgeIt& first(InEdgeIt& e, const Node v) const {
1.31 e=InEdgeIt(*this,v); return e; }
1.32
1.33 + /// Node ID.
1.34 +
1.35 + /// The ID of a valid Node is a nonnegative integer not greater than
1.36 + /// \ref maxNodeId(). The range of the ID's is not surely continuous
1.37 + /// and the greatest node ID can be actually less then \ref maxNodeId().
1.38 + ///
1.39 + /// The ID of the \ref INVALID node is -1.
1.40 + ///\return The ID of the node \c v.
1.41 static int id(Node v) { return v.n; }
1.42 + /// Edge ID.
1.43 +
1.44 + /// The ID of a valid Edge is a nonnegative integer not greater than
1.45 + /// \ref maxEdgeId(). The range of the ID's is not surely continuous
1.46 + /// and the greatest edge ID can be actually less then \ref maxEdgeId().
1.47 + ///
1.48 + /// The ID of the \ref INVALID edge is -1.
1.49 + ///\return The ID of the edge \c e.
1.50 static int id(Edge e) { return e.n; }
1.51
1.52 /// Finds an edge between two nodes.