lemon/suurballe.h
branch1.1
changeset 730 4f8b22521b4a
parent 644 189760a7cdd0
parent 718 30c77d1c0cba
child 761 f1398882a928
equal deleted inserted replaced
8:d124adbdd8b9 11:ea18d0c96a10
    53   ///
    53   ///
    54   /// \tparam GR The digraph type the algorithm runs on.
    54   /// \tparam GR The digraph type the algorithm runs on.
    55   /// \tparam LEN The type of the length map.
    55   /// \tparam LEN The type of the length map.
    56   /// The default value is <tt>GR::ArcMap<int></tt>.
    56   /// The default value is <tt>GR::ArcMap<int></tt>.
    57   ///
    57   ///
    58   /// \warning Length values should be \e non-negative \e integers.
    58   /// \warning Length values should be \e non-negative.
    59   ///
    59   ///
    60   /// \note For finding node-disjoint paths this algorithm can be used
    60   /// \note For finding node-disjoint paths this algorithm can be used
    61   /// along with the \ref SplitNodes adaptor.
    61   /// along with the \ref SplitNodes adaptor.
    62 #ifdef DOXYGEN
    62 #ifdef DOXYGEN
    63   template <typename GR, typename LEN>
    63   template <typename GR, typename LEN>
   250     /// \param length The length (cost) values of the arcs.
   250     /// \param length The length (cost) values of the arcs.
   251     Suurballe( const Digraph &graph,
   251     Suurballe( const Digraph &graph,
   252                const LengthMap &length ) :
   252                const LengthMap &length ) :
   253       _graph(graph), _length(length), _flow(0), _local_flow(false),
   253       _graph(graph), _length(length), _flow(0), _local_flow(false),
   254       _potential(0), _local_potential(false), _pred(graph)
   254       _potential(0), _local_potential(false), _pred(graph)
   255     {
   255     {}
   256       LEMON_ASSERT(std::numeric_limits<Length>::is_integer,
       
   257         "The length type of Suurballe must be integer");
       
   258     }
       
   259 
   256 
   260     /// Destructor.
   257     /// Destructor.
   261     ~Suurballe() {
   258     ~Suurballe() {
   262       if (_local_flow) delete _flow;
   259       if (_local_flow) delete _flow;
   263       if (_local_potential) delete _potential;
   260       if (_local_potential) delete _potential;
   518     /// \param i The function returns the <tt>i</tt>-th path.
   515     /// \param i The function returns the <tt>i</tt>-th path.
   519     /// \c i must be between \c 0 and <tt>%pathNum()-1</tt>.
   516     /// \c i must be between \c 0 and <tt>%pathNum()-1</tt>.
   520     ///
   517     ///
   521     /// \pre \ref run() or \ref findPaths() must be called before using
   518     /// \pre \ref run() or \ref findPaths() must be called before using
   522     /// this function.
   519     /// this function.
   523     Path path(int i) const {
   520     const Path& path(int i) const {
   524       return paths[i];
   521       return paths[i];
   525     }
   522     }
   526 
   523 
   527     /// @}
   524     /// @}
   528 
   525