1.1 --- a/src/include/skeletons/graph.h Fri Apr 30 19:02:40 2004 +0000
1.2 +++ b/src/include/skeletons/graph.h Mon May 03 07:27:29 2004 +0000
1.3 @@ -1,6 +1,6 @@
1.4 // -*- c++ -*-
1.5 -#ifndef HUGO_GRAPH_H
1.6 -#define HUGO_GRAPH_H
1.7 +#ifndef HUGO_SKELETON_GRAPH_H
1.8 +#define HUGO_SKELETON_GRAPH_H
1.9
1.10 ///\file
1.11 ///\brief Declaration of GraphSkeleton.
1.12 @@ -58,13 +58,13 @@
1.13
1.14 /// Two iterators are equal if and only if they point to the
1.15 /// same object or both are invalid.
1.16 - bool operator==(Node n) const { return true; }
1.17 + bool operator==(Node) const { return true; }
1.18
1.19 /// \sa \ref operator==(Node n)
1.20 ///
1.21 - bool operator!=(Node n) const { return true; }
1.22 + bool operator!=(Node) const { return true; }
1.23
1.24 - bool operator<(Node n) const { return true; }
1.25 + bool operator<(Node) const { return true; }
1.26 };
1.27
1.28 /// This iterator goes through each node.
1.29 @@ -90,7 +90,7 @@
1.30 NodeIt(const GraphSkeleton &G) {}
1.31 /// @warning The default constructor sets the iterator
1.32 /// to an undefined value.
1.33 - NodeIt(const NodeIt &) {}
1.34 + NodeIt(const NodeIt &n) : Node(n) {}
1.35 };
1.36
1.37
1.38 @@ -104,9 +104,9 @@
1.39 Edge(Invalid) {}
1.40 /// Two iterators are equal if and only if they point to the
1.41 /// same object or both are invalid.
1.42 - bool operator==(Edge n) const { return true; }
1.43 - bool operator!=(Edge n) const { return true; }
1.44 - bool operator<(Edge n) const { return true; }
1.45 + bool operator==(Edge) const { return true; }
1.46 + bool operator!=(Edge) const { return true; }
1.47 + bool operator<(Edge) const { return true; }
1.48 };
1.49
1.50 /// This iterator goes trough the outgoing edges of a node.
1.51 @@ -187,9 +187,9 @@
1.52 NodeIt &first(NodeIt &i) const { return i;}
1.53
1.54 /// The first incoming edge.
1.55 - InEdgeIt &first(InEdgeIt &i, Node n) const { return i;}
1.56 + InEdgeIt &first(InEdgeIt &i, Node) const { return i;}
1.57 /// The first outgoing edge.
1.58 - OutEdgeIt &first(OutEdgeIt &i, Node n) const { return i;}
1.59 + OutEdgeIt &first(OutEdgeIt &i, Node) const { return i;}
1.60 // SymEdgeIt &first(SymEdgeIt &, Node) const { return i;}
1.61 /// The first edge of the Graph.
1.62 EdgeIt &first(EdgeIt &i) const { return i;}
1.63 @@ -258,7 +258,7 @@
1.64 ///Add a new edge to the graph with tail node \c tail
1.65 ///and head node \c head.
1.66 ///\return the new edge.
1.67 - Edge addEdge(Node tail, Node head) { return INVALID;}
1.68 + Edge addEdge(Node, Node) { return INVALID;}
1.69
1.70 /// Resets the graph.
1.71
1.72 @@ -294,11 +294,11 @@
1.73
1.74 /// Sets the value associated with node \c i to the value \c t.
1.75 ///
1.76 - void set(Node i, T t) {}
1.77 - /// Gets the value of a node.
1.78 - T get(Node i) const {return *(T*)0;} //FIXME: Is it necessary
1.79 - T &operator[](Node i) {return *(T*)0;}
1.80 - const T &operator[](Node i) const {return *(T*)0;}
1.81 + void set(Node, T) {}
1.82 + // Gets the value of a node.
1.83 + //T get(Node i) const {return *(T*)0;} //FIXME: Is it necessary?
1.84 + T &operator[](Node) {return *(T*)0;}
1.85 + const T &operator[](Node) const {return *(T*)0;}
1.86
1.87 /// Updates the map if the graph has been changed
1.88
1.89 @@ -326,9 +326,14 @@
1.90 EdgeMap(const GraphSkeleton &G) {}
1.91 EdgeMap(const GraphSkeleton &G, T t) {}
1.92
1.93 - void set(Edge i, T t) {}
1.94 - T get(Edge i) const {return *(T*)0;}
1.95 - T &operator[](Edge i) {return *(T*)0;}
1.96 + ///\todo It can copy between different types.
1.97 + ///
1.98 + template<typename TT> EdgeMap(const EdgeMap<TT> &m) {}
1.99 +
1.100 + void set(Edge, T) {}
1.101 + //T get(Edge) const {return *(T*)0;}
1.102 + T &operator[](Edge) {return *(T*)0;}
1.103 + const T &operator[](Edge) const {return *(T*)0;}
1.104
1.105 void update() {}
1.106 void update(T a) {} //FIXME: Is it necessary
1.107 @@ -391,4 +396,4 @@
1.108
1.109 // }
1.110
1.111 -#endif // HUGO_GRAPH_H
1.112 +#endif // HUGO_SKELETON_GRAPH_H