lemon/core.h
changeset 1176 cd72eae05bdf
parent 964 2b6bffe0e7e8
parent 993 157427808b40
child 1000 404b98971e1f
child 1084 8b2d4e5d96e4
equal deleted inserted replaced
24:989f00052616 28:55713a4a0fe7
  1847     ///
  1847     ///
  1848     ///\warning If you change the digraph, refresh() must be called before using
  1848     ///\warning If you change the digraph, refresh() must be called before using
  1849     ///this operator. If you change the outgoing arcs of
  1849     ///this operator. If you change the outgoing arcs of
  1850     ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
  1850     ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
  1851     ///
  1851     ///
  1852 #ifdef DOXYGEN
  1852     Arc operator()(Node s, Node t, Arc prev=INVALID) const
  1853     Arc operator()(Node s, Node t, Arc prev=INVALID) const {}
       
  1854 #else
       
  1855     using ArcLookUp<GR>::operator() ;
       
  1856     Arc operator()(Node s, Node t, Arc prev) const
       
  1857     {
  1853     {
  1858       return prev==INVALID?(*this)(s,t):_next[prev];
  1854       if(prev==INVALID)
  1859     }
  1855         {
       
  1856           Arc f=INVALID;
       
  1857           Arc e;
       
  1858           for(e=_head[s];
       
  1859               e!=INVALID&&_g.target(e)!=t;
       
  1860               e = t < _g.target(e)?_left[e]:_right[e]) ;
       
  1861           while(e!=INVALID)
       
  1862             if(_g.target(e)==t)
       
  1863               {
       
  1864                 f = e;
       
  1865                 e = _left[e];
       
  1866               }
       
  1867             else e = _right[e];
       
  1868           return f;
       
  1869         }
       
  1870       else return _next[prev];
       
  1871     }
       
  1872 
       
  1873   };
       
  1874 
       
  1875   /// @}
       
  1876 
       
  1877 } //namespace lemon
       
  1878 
  1860 #endif
  1879 #endif
  1861 
       
  1862   };
       
  1863 
       
  1864   /// @}
       
  1865 
       
  1866 } //namespace lemon
       
  1867 
       
  1868 #endif