lemon/core.h
changeset 1149 157427808b40
parent 984 9f22c22fe227
child 1150 9147b013331a
child 1151 0da74b2d0bea
child 1152 20ae244b4779
child 1159 7fdaa05a69a1
child 1236 756022ac1674
equal deleted inserted replaced
21:215d9fa38d48 30:f81fa3a20e48
  1846     ///
  1846     ///
  1847     ///\warning If you change the digraph, refresh() must be called before using
  1847     ///\warning If you change the digraph, refresh() must be called before using
  1848     ///this operator. If you change the outgoing arcs of
  1848     ///this operator. If you change the outgoing arcs of
  1849     ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
  1849     ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
  1850     ///
  1850     ///
  1851 #ifdef DOXYGEN
  1851     Arc operator()(Node s, Node t, Arc prev=INVALID) const
  1852     Arc operator()(Node s, Node t, Arc prev=INVALID) const {}
       
  1853 #else
       
  1854     using ArcLookUp<GR>::operator() ;
       
  1855     Arc operator()(Node s, Node t, Arc prev) const
       
  1856     {
  1852     {
  1857       return prev==INVALID?(*this)(s,t):_next[prev];
  1853       if(prev==INVALID)
  1858     }
  1854         {
       
  1855           Arc f=INVALID;
       
  1856           Arc e;
       
  1857           for(e=_head[s];
       
  1858               e!=INVALID&&_g.target(e)!=t;
       
  1859               e = t < _g.target(e)?_left[e]:_right[e]) ;
       
  1860           while(e!=INVALID)
       
  1861             if(_g.target(e)==t)
       
  1862               {
       
  1863                 f = e;
       
  1864                 e = _left[e];
       
  1865               }
       
  1866             else e = _right[e];
       
  1867           return f;
       
  1868         }
       
  1869       else return _next[prev];
       
  1870     }
       
  1871 
       
  1872   };
       
  1873 
       
  1874   /// @}
       
  1875 
       
  1876 } //namespace lemon
       
  1877 
  1859 #endif
  1878 #endif
  1860 
       
  1861   };
       
  1862 
       
  1863   /// @}
       
  1864 
       
  1865 } //namespace lemon
       
  1866 
       
  1867 #endif