doc/maps.dox
changeset 939 1559584ca634
parent 921 818510fa3d99
child 986 e997802b855c
equal deleted inserted replaced
10:e36eda8d6cb8 11:09a3eec21e18
   109   const Graph &G;
   109   const Graph &G;
   110   const Graph::EdgeMap<double> &orig_len;
   110   const Graph::EdgeMap<double> &orig_len;
   111   const Graph::NodeMap<double> &pot;
   111   const Graph::NodeMap<double> &pot;
   112   
   112   
   113 public:
   113 public:
   114   KeyType operator[](ValueType e) const {
   114   ValueType operator[](KeyType e) const {
   115     return orig_len.get(e)-pot.get(G.head(e))-pot.get(G.tail(e));
   115     return orig_len.get(e)-pot.get(G.head(e))-pot.get(G.tail(e));
   116   }
   116   }
   117   
   117   
   118   MyLengthMap(const Graph &g, const Graph::EdgeMap &o,const Graph::NodeMap &p)
   118   MyLengthMap(const Graph &g, const Graph::EdgeMap &o,const Graph::NodeMap &p)
   119     : G(g), orig_len(o), pot(p) {};
   119     : G(g), orig_len(o), pot(p) {};