lemon/graph_utils.h
changeset 1657 754f38f56b49
parent 1591 03aa0a6c8dca
child 1674 648aa2f33dc8
equal deleted inserted replaced
18:4da9e65d010f 19:f4e3b28abf92
   993     ///
   993     ///
   994     /// The subscript operator.
   994     /// The subscript operator.
   995     /// \param key An undirected edge 
   995     /// \param key An undirected edge 
   996     /// \return The "forward" directed edge view of undirected edge 
   996     /// \return The "forward" directed edge view of undirected edge 
   997     Value operator[](const Key& key) const {
   997     Value operator[](const Key& key) const {
   998       return graph.edgeWithSource(key, graph.source(key));
   998       return graph.direct(key, true);
   999     }
   999     }
  1000 
  1000 
  1001   private:
  1001   private:
  1002     const Graph& graph;
  1002     const Graph& graph;
  1003   };
  1003   };
  1033     ///
  1033     ///
  1034     /// The subscript operator.
  1034     /// The subscript operator.
  1035     /// \param key An undirected edge 
  1035     /// \param key An undirected edge 
  1036     /// \return The "backward" directed edge view of undirected edge 
  1036     /// \return The "backward" directed edge view of undirected edge 
  1037     Value operator[](const Key& key) const {
  1037     Value operator[](const Key& key) const {
  1038       return graph.edgeWithSource(key, graph.target(key));
  1038       return graph.direct(key, false);
  1039     }
  1039     }
  1040 
  1040 
  1041   private:
  1041   private:
  1042     const Graph& graph;
  1042     const Graph& graph;
  1043   };
  1043   };