902 public: |
902 public: |
903 EdgeMap(const BidirGraphWrapper<Graph>& _G) : forward_map(*(_G.graph)), backward_map(*(_G.graph)) { } |
903 EdgeMap(const BidirGraphWrapper<Graph>& _G) : forward_map(*(_G.graph)), backward_map(*(_G.graph)) { } |
904 EdgeMap(const BidirGraphWrapper<Graph>& _G, T a) : forward_map(*(_G.graph), a), backward_map(*(_G.graph), a) { } |
904 EdgeMap(const BidirGraphWrapper<Graph>& _G, T a) : forward_map(*(_G.graph), a), backward_map(*(_G.graph), a) { } |
905 void set(Edge e, T a) { |
905 void set(Edge e, T a) { |
906 if (!e.backward) |
906 if (!e.backward) |
907 forward_map.set(e.out, a); |
907 forward_map.set(e/*.out*/, a); |
908 else |
908 else |
909 backward_map.set(e.in, a); |
909 backward_map.set(e/*.in*/, a); |
910 } |
910 } |
911 T operator[](Edge e) const { |
911 T operator[](Edge e) const { |
912 if (!e.backward) |
912 if (!e.backward) |
913 return forward_map[e.out]; |
913 return forward_map[e/*.out*/]; |
914 else |
914 else |
915 return backward_map[e.in]; |
915 return backward_map[e/*.in*/]; |
916 } |
916 } |
917 // T get(Edge e) const { |
917 // T get(Edge e) const { |
918 // if (e.out_or_in) |
918 // if (e.out_or_in) |
919 // return forward_map.get(e.out); |
919 // return forward_map.get(e.out); |
920 // else |
920 // else |