lemon/suurballe.h
author Alpar Juttner <alpar@cs.elte.hu>
Tue, 28 Oct 2008 18:39:53 +0000
changeset 345 2f64c4a692a8
child 346 7f26c4b32651
permissions -rw-r--r--
Port Suurballe algorithm from svn -r3512
alpar@345
     1
/* -*- C++ -*-
alpar@345
     2
 *
alpar@345
     3
 * This file is a part of LEMON, a generic C++ optimization library
alpar@345
     4
 *
alpar@345
     5
 * Copyright (C) 2003-2008
alpar@345
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@345
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@345
     8
 *
alpar@345
     9
 * Permission to use, modify and distribute this software is granted
alpar@345
    10
 * provided that this copyright notice appears in all copies. For
alpar@345
    11
 * precise terms see the accompanying LICENSE file.
alpar@345
    12
 *
alpar@345
    13
 * This software is provided "AS IS" with no warranty of any kind,
alpar@345
    14
 * express or implied, and with no claim as to its suitability for any
alpar@345
    15
 * purpose.
alpar@345
    16
 *
alpar@345
    17
 */
alpar@345
    18
alpar@345
    19
#ifndef LEMON_SUURBALLE_H
alpar@345
    20
#define LEMON_SUURBALLE_H
alpar@345
    21
alpar@345
    22
///\ingroup shortest_path
alpar@345
    23
///\file
alpar@345
    24
///\brief An algorithm for finding arc-disjoint paths between two
alpar@345
    25
/// nodes having minimum total length.
alpar@345
    26
alpar@345
    27
#include <vector>
alpar@345
    28
#include <lemon/bin_heap.h>
alpar@345
    29
#include <lemon/path.h>
alpar@345
    30
alpar@345
    31
namespace lemon {
alpar@345
    32
alpar@345
    33
  /// \addtogroup shortest_path
alpar@345
    34
  /// @{
alpar@345
    35
alpar@345
    36
  /// \brief Implementation of an algorithm for finding arc-disjoint
alpar@345
    37
  /// paths between two nodes having minimum total length.
alpar@345
    38
  ///
alpar@345
    39
  /// \ref lemon::Suurballe "Suurballe" implements an algorithm for
alpar@345
    40
  /// finding arc-disjoint paths having minimum total length (cost)
alpar@345
    41
  /// from a given source node to a given target node in a directed
alpar@345
    42
  /// digraph.
alpar@345
    43
  ///
alpar@345
    44
  /// In fact, this implementation is the specialization of the
alpar@345
    45
  /// \ref CapacityScaling "successive shortest path" algorithm.
alpar@345
    46
  ///
alpar@345
    47
  /// \tparam Digraph The directed digraph type the algorithm runs on.
alpar@345
    48
  /// \tparam LengthMap The type of the length (cost) map.
alpar@345
    49
  ///
alpar@345
    50
  /// \warning Length values should be \e non-negative \e integers.
alpar@345
    51
  ///
alpar@345
    52
  /// \note For finding node-disjoint paths this algorithm can be used
alpar@345
    53
  /// with \ref SplitDigraphAdaptor.
alpar@345
    54
  ///
alpar@345
    55
  /// \author Attila Bernath and Peter Kovacs
alpar@345
    56
  
alpar@345
    57
  template < typename Digraph, 
alpar@345
    58
             typename LengthMap = typename Digraph::template ArcMap<int> >
alpar@345
    59
  class Suurballe
alpar@345
    60
  {
alpar@345
    61
    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
alpar@345
    62
alpar@345
    63
    typedef typename LengthMap::Value Length;
alpar@345
    64
    typedef ConstMap<Arc, int> ConstArcMap;
alpar@345
    65
    typedef typename Digraph::template NodeMap<Arc> PredMap;
alpar@345
    66
alpar@345
    67
  public:
alpar@345
    68
alpar@345
    69
    /// The type of the flow map.
alpar@345
    70
    typedef typename Digraph::template ArcMap<int> FlowMap;
alpar@345
    71
    /// The type of the potential map.
alpar@345
    72
    typedef typename Digraph::template NodeMap<Length> PotentialMap;
alpar@345
    73
    /// The type of the path structures.
alpar@345
    74
    typedef SimplePath<Digraph> Path;
alpar@345
    75
alpar@345
    76
  private:
alpar@345
    77
  
alpar@345
    78
    /// \brief Special implementation of the \ref Dijkstra algorithm
alpar@345
    79
    /// for finding shortest paths in the residual network.
alpar@345
    80
    ///
alpar@345
    81
    /// \ref ResidualDijkstra is a special implementation of the
alpar@345
    82
    /// \ref Dijkstra algorithm for finding shortest paths in the
alpar@345
    83
    /// residual network of the digraph with respect to the reduced arc
alpar@345
    84
    /// lengths and modifying the node potentials according to the
alpar@345
    85
    /// distance of the nodes.
alpar@345
    86
    class ResidualDijkstra
alpar@345
    87
    {
alpar@345
    88
      typedef typename Digraph::template NodeMap<int> HeapCrossRef;
alpar@345
    89
      typedef BinHeap<Length, HeapCrossRef> Heap;
alpar@345
    90
alpar@345
    91
    private:
alpar@345
    92
alpar@345
    93
      // The directed digraph the algorithm runs on
alpar@345
    94
      const Digraph &_graph;
alpar@345
    95
alpar@345
    96
      // The main maps
alpar@345
    97
      const FlowMap &_flow;
alpar@345
    98
      const LengthMap &_length;
alpar@345
    99
      PotentialMap &_potential;
alpar@345
   100
alpar@345
   101
      // The distance map
alpar@345
   102
      PotentialMap _dist;
alpar@345
   103
      // The pred arc map
alpar@345
   104
      PredMap &_pred;
alpar@345
   105
      // The processed (i.e. permanently labeled) nodes
alpar@345
   106
      std::vector<Node> _proc_nodes;
alpar@345
   107
      
alpar@345
   108
      Node _s;
alpar@345
   109
      Node _t;
alpar@345
   110
alpar@345
   111
    public:
alpar@345
   112
alpar@345
   113
      /// Constructor.
alpar@345
   114
      ResidualDijkstra( const Digraph &digraph,
alpar@345
   115
                        const FlowMap &flow,
alpar@345
   116
                        const LengthMap &length,
alpar@345
   117
                        PotentialMap &potential,
alpar@345
   118
                        PredMap &pred,
alpar@345
   119
                        Node s, Node t ) :
alpar@345
   120
        _graph(digraph), _flow(flow), _length(length), _potential(potential),
alpar@345
   121
        _dist(digraph), _pred(pred), _s(s), _t(t) {}
alpar@345
   122
alpar@345
   123
      /// \brief Runs the algorithm. Returns \c true if a path is found
alpar@345
   124
      /// from the source node to the target node.
alpar@345
   125
      bool run() {
alpar@345
   126
        HeapCrossRef heap_cross_ref(_graph, Heap::PRE_HEAP);
alpar@345
   127
        Heap heap(heap_cross_ref);
alpar@345
   128
        heap.push(_s, 0);
alpar@345
   129
        _pred[_s] = INVALID;
alpar@345
   130
        _proc_nodes.clear();
alpar@345
   131
alpar@345
   132
        // Processing nodes
alpar@345
   133
        while (!heap.empty() && heap.top() != _t) {
alpar@345
   134
          Node u = heap.top(), v;
alpar@345
   135
          Length d = heap.prio() + _potential[u], nd;
alpar@345
   136
          _dist[u] = heap.prio();
alpar@345
   137
          heap.pop();
alpar@345
   138
          _proc_nodes.push_back(u);
alpar@345
   139
alpar@345
   140
          // Traversing outgoing arcs
alpar@345
   141
          for (OutArcIt e(_graph, u); e != INVALID; ++e) {
alpar@345
   142
            if (_flow[e] == 0) {
alpar@345
   143
              v = _graph.target(e);
alpar@345
   144
              switch(heap.state(v)) {
alpar@345
   145
              case Heap::PRE_HEAP:
alpar@345
   146
                heap.push(v, d + _length[e] - _potential[v]);
alpar@345
   147
                _pred[v] = e;
alpar@345
   148
                break;
alpar@345
   149
              case Heap::IN_HEAP:
alpar@345
   150
                nd = d + _length[e] - _potential[v];
alpar@345
   151
                if (nd < heap[v]) {
alpar@345
   152
                  heap.decrease(v, nd);
alpar@345
   153
                  _pred[v] = e;
alpar@345
   154
                }
alpar@345
   155
                break;
alpar@345
   156
              case Heap::POST_HEAP:
alpar@345
   157
                break;
alpar@345
   158
              }
alpar@345
   159
            }
alpar@345
   160
          }
alpar@345
   161
alpar@345
   162
          // Traversing incoming arcs
alpar@345
   163
          for (InArcIt e(_graph, u); e != INVALID; ++e) {
alpar@345
   164
            if (_flow[e] == 1) {
alpar@345
   165
              v = _graph.source(e);
alpar@345
   166
              switch(heap.state(v)) {
alpar@345
   167
              case Heap::PRE_HEAP:
alpar@345
   168
                heap.push(v, d - _length[e] - _potential[v]);
alpar@345
   169
                _pred[v] = e;
alpar@345
   170
                break;
alpar@345
   171
              case Heap::IN_HEAP:
alpar@345
   172
                nd = d - _length[e] - _potential[v];
alpar@345
   173
                if (nd < heap[v]) {
alpar@345
   174
                  heap.decrease(v, nd);
alpar@345
   175
                  _pred[v] = e;
alpar@345
   176
                }
alpar@345
   177
                break;
alpar@345
   178
              case Heap::POST_HEAP:
alpar@345
   179
                break;
alpar@345
   180
              }
alpar@345
   181
            }
alpar@345
   182
          }
alpar@345
   183
        }
alpar@345
   184
        if (heap.empty()) return false;
alpar@345
   185
alpar@345
   186
        // Updating potentials of processed nodes
alpar@345
   187
        Length t_dist = heap.prio();
alpar@345
   188
        for (int i = 0; i < int(_proc_nodes.size()); ++i)
alpar@345
   189
          _potential[_proc_nodes[i]] += _dist[_proc_nodes[i]] - t_dist;
alpar@345
   190
        return true;
alpar@345
   191
      }
alpar@345
   192
alpar@345
   193
    }; //class ResidualDijkstra
alpar@345
   194
alpar@345
   195
  private:
alpar@345
   196
alpar@345
   197
    // The directed digraph the algorithm runs on
alpar@345
   198
    const Digraph &_graph;
alpar@345
   199
    // The length map
alpar@345
   200
    const LengthMap &_length;
alpar@345
   201
    
alpar@345
   202
    // Arc map of the current flow
alpar@345
   203
    FlowMap *_flow;
alpar@345
   204
    bool _local_flow;
alpar@345
   205
    // Node map of the current potentials
alpar@345
   206
    PotentialMap *_potential;
alpar@345
   207
    bool _local_potential;
alpar@345
   208
alpar@345
   209
    // The source node
alpar@345
   210
    Node _source;
alpar@345
   211
    // The target node
alpar@345
   212
    Node _target;
alpar@345
   213
alpar@345
   214
    // Container to store the found paths
alpar@345
   215
    std::vector< SimplePath<Digraph> > paths;
alpar@345
   216
    int _path_num;
alpar@345
   217
alpar@345
   218
    // The pred arc map
alpar@345
   219
    PredMap _pred;
alpar@345
   220
    // Implementation of the Dijkstra algorithm for finding augmenting
alpar@345
   221
    // shortest paths in the residual network
alpar@345
   222
    ResidualDijkstra *_dijkstra;
alpar@345
   223
alpar@345
   224
  public:
alpar@345
   225
alpar@345
   226
    /// \brief Constructor.
alpar@345
   227
    ///
alpar@345
   228
    /// Constructor.
alpar@345
   229
    ///
alpar@345
   230
    /// \param digraph The directed digraph the algorithm runs on.
alpar@345
   231
    /// \param length The length (cost) values of the arcs.
alpar@345
   232
    /// \param s The source node.
alpar@345
   233
    /// \param t The target node.
alpar@345
   234
    Suurballe( const Digraph &digraph,
alpar@345
   235
               const LengthMap &length,
alpar@345
   236
               Node s, Node t ) :
alpar@345
   237
      _graph(digraph), _length(length), _flow(0), _local_flow(false),
alpar@345
   238
      _potential(0), _local_potential(false), _source(s), _target(t),
alpar@345
   239
      _pred(digraph) {}
alpar@345
   240
alpar@345
   241
    /// Destructor.
alpar@345
   242
    ~Suurballe() {
alpar@345
   243
      if (_local_flow) delete _flow;
alpar@345
   244
      if (_local_potential) delete _potential;
alpar@345
   245
      delete _dijkstra;
alpar@345
   246
    }
alpar@345
   247
alpar@345
   248
    /// \brief Sets the flow map.
alpar@345
   249
    ///
alpar@345
   250
    /// Sets the flow map.
alpar@345
   251
    ///
alpar@345
   252
    /// The found flow contains only 0 and 1 values. It is the union of
alpar@345
   253
    /// the found arc-disjoint paths.
alpar@345
   254
    ///
alpar@345
   255
    /// \return \c (*this)
alpar@345
   256
    Suurballe& flowMap(FlowMap &map) {
alpar@345
   257
      if (_local_flow) {
alpar@345
   258
        delete _flow;
alpar@345
   259
        _local_flow = false;
alpar@345
   260
      }
alpar@345
   261
      _flow = &map;
alpar@345
   262
      return *this;
alpar@345
   263
    }
alpar@345
   264
alpar@345
   265
    /// \brief Sets the potential map.
alpar@345
   266
    ///
alpar@345
   267
    /// Sets the potential map.
alpar@345
   268
    ///
alpar@345
   269
    /// The potentials provide the dual solution of the underlying 
alpar@345
   270
    /// minimum cost flow problem.
alpar@345
   271
    ///
alpar@345
   272
    /// \return \c (*this)
alpar@345
   273
    Suurballe& potentialMap(PotentialMap &map) {
alpar@345
   274
      if (_local_potential) {
alpar@345
   275
        delete _potential;
alpar@345
   276
        _local_potential = false;
alpar@345
   277
      }
alpar@345
   278
      _potential = &map;
alpar@345
   279
      return *this;
alpar@345
   280
    }
alpar@345
   281
alpar@345
   282
    /// \name Execution control
alpar@345
   283
    /// The simplest way to execute the algorithm is to call the run()
alpar@345
   284
    /// function.
alpar@345
   285
    /// \n
alpar@345
   286
    /// If you only need the flow that is the union of the found
alpar@345
   287
    /// arc-disjoint paths, you may call init() and findFlow().
alpar@345
   288
alpar@345
   289
    /// @{
alpar@345
   290
alpar@345
   291
    /// \brief Runs the algorithm.
alpar@345
   292
    ///
alpar@345
   293
    /// Runs the algorithm.
alpar@345
   294
    ///
alpar@345
   295
    /// \param k The number of paths to be found.
alpar@345
   296
    ///
alpar@345
   297
    /// \return \c k if there are at least \c k arc-disjoint paths
alpar@345
   298
    /// from \c s to \c t. Otherwise it returns the number of
alpar@345
   299
    /// arc-disjoint paths found.
alpar@345
   300
    ///
alpar@345
   301
    /// \note Apart from the return value, <tt>s.run(k)</tt> is just a
alpar@345
   302
    /// shortcut of the following code.
alpar@345
   303
    /// \code
alpar@345
   304
    ///   s.init();
alpar@345
   305
    ///   s.findFlow(k);
alpar@345
   306
    ///   s.findPaths();
alpar@345
   307
    /// \endcode
alpar@345
   308
    int run(int k = 2) {
alpar@345
   309
      init();
alpar@345
   310
      findFlow(k);
alpar@345
   311
      findPaths();
alpar@345
   312
      return _path_num;
alpar@345
   313
    }
alpar@345
   314
alpar@345
   315
    /// \brief Initializes the algorithm.
alpar@345
   316
    ///
alpar@345
   317
    /// Initializes the algorithm.
alpar@345
   318
    void init() {
alpar@345
   319
      // Initializing maps
alpar@345
   320
      if (!_flow) {
alpar@345
   321
        _flow = new FlowMap(_graph);
alpar@345
   322
        _local_flow = true;
alpar@345
   323
      }
alpar@345
   324
      if (!_potential) {
alpar@345
   325
        _potential = new PotentialMap(_graph);
alpar@345
   326
        _local_potential = true;
alpar@345
   327
      }
alpar@345
   328
      for (ArcIt e(_graph); e != INVALID; ++e) (*_flow)[e] = 0;
alpar@345
   329
      for (NodeIt n(_graph); n != INVALID; ++n) (*_potential)[n] = 0;
alpar@345
   330
alpar@345
   331
      _dijkstra = new ResidualDijkstra( _graph, *_flow, _length, 
alpar@345
   332
                                        *_potential, _pred,
alpar@345
   333
                                        _source, _target );
alpar@345
   334
    }
alpar@345
   335
alpar@345
   336
    /// \brief Executes the successive shortest path algorithm to find
alpar@345
   337
    /// an optimal flow.
alpar@345
   338
    ///
alpar@345
   339
    /// Executes the successive shortest path algorithm to find a
alpar@345
   340
    /// minimum cost flow, which is the union of \c k or less
alpar@345
   341
    /// arc-disjoint paths.
alpar@345
   342
    ///
alpar@345
   343
    /// \return \c k if there are at least \c k arc-disjoint paths
alpar@345
   344
    /// from \c s to \c t. Otherwise it returns the number of
alpar@345
   345
    /// arc-disjoint paths found.
alpar@345
   346
    ///
alpar@345
   347
    /// \pre \ref init() must be called before using this function.
alpar@345
   348
    int findFlow(int k = 2) {
alpar@345
   349
      // Finding shortest paths
alpar@345
   350
      _path_num = 0;
alpar@345
   351
      while (_path_num < k) {
alpar@345
   352
        // Running Dijkstra
alpar@345
   353
        if (!_dijkstra->run()) break;
alpar@345
   354
        ++_path_num;
alpar@345
   355
alpar@345
   356
        // Setting the flow along the found shortest path
alpar@345
   357
        Node u = _target;
alpar@345
   358
        Arc e;
alpar@345
   359
        while ((e = _pred[u]) != INVALID) {
alpar@345
   360
          if (u == _graph.target(e)) {
alpar@345
   361
            (*_flow)[e] = 1;
alpar@345
   362
            u = _graph.source(e);
alpar@345
   363
          } else {
alpar@345
   364
            (*_flow)[e] = 0;
alpar@345
   365
            u = _graph.target(e);
alpar@345
   366
          }
alpar@345
   367
        }
alpar@345
   368
      }
alpar@345
   369
      return _path_num;
alpar@345
   370
    }
alpar@345
   371
    
alpar@345
   372
    /// \brief Computes the paths from the flow.
alpar@345
   373
    ///
alpar@345
   374
    /// Computes the paths from the flow.
alpar@345
   375
    ///
alpar@345
   376
    /// \pre \ref init() and \ref findFlow() must be called before using
alpar@345
   377
    /// this function.
alpar@345
   378
    void findPaths() {
alpar@345
   379
      // Creating the residual flow map (the union of the paths not
alpar@345
   380
      // found so far)
alpar@345
   381
      FlowMap res_flow(_graph);
alpar@345
   382
      for(ArcIt a(_graph);a!=INVALID;++a) res_flow[a]=(*_flow)[a];
alpar@345
   383
alpar@345
   384
      paths.clear();
alpar@345
   385
      paths.resize(_path_num);
alpar@345
   386
      for (int i = 0; i < _path_num; ++i) {
alpar@345
   387
        Node n = _source;
alpar@345
   388
        while (n != _target) {
alpar@345
   389
          OutArcIt e(_graph, n);
alpar@345
   390
          for ( ; res_flow[e] == 0; ++e) ;
alpar@345
   391
          n = _graph.target(e);
alpar@345
   392
          paths[i].addBack(e);
alpar@345
   393
          res_flow[e] = 0;
alpar@345
   394
        }
alpar@345
   395
      }
alpar@345
   396
    }
alpar@345
   397
alpar@345
   398
    /// @}
alpar@345
   399
alpar@345
   400
    /// \name Query Functions
alpar@345
   401
    /// The result of the algorithm can be obtained using these
alpar@345
   402
    /// functions.
alpar@345
   403
    /// \n The algorithm should be executed before using them.
alpar@345
   404
alpar@345
   405
    /// @{
alpar@345
   406
alpar@345
   407
    /// \brief Returns a const reference to the arc map storing the
alpar@345
   408
    /// found flow.
alpar@345
   409
    ///
alpar@345
   410
    /// Returns a const reference to the arc map storing the flow that
alpar@345
   411
    /// is the union of the found arc-disjoint paths.
alpar@345
   412
    ///
alpar@345
   413
    /// \pre \ref run() or findFlow() must be called before using this
alpar@345
   414
    /// function.
alpar@345
   415
    const FlowMap& flowMap() const {
alpar@345
   416
      return *_flow;
alpar@345
   417
    }
alpar@345
   418
alpar@345
   419
    /// \brief Returns a const reference to the node map storing the
alpar@345
   420
    /// found potentials (the dual solution).
alpar@345
   421
    ///
alpar@345
   422
    /// Returns a const reference to the node map storing the found
alpar@345
   423
    /// potentials that provide the dual solution of the underlying 
alpar@345
   424
    /// minimum cost flow problem.
alpar@345
   425
    ///
alpar@345
   426
    /// \pre \ref run() or findFlow() must be called before using this
alpar@345
   427
    /// function.
alpar@345
   428
    const PotentialMap& potentialMap() const {
alpar@345
   429
      return *_potential;
alpar@345
   430
    }
alpar@345
   431
alpar@345
   432
    /// \brief Returns the flow on the given arc.
alpar@345
   433
    ///
alpar@345
   434
    /// Returns the flow on the given arc.
alpar@345
   435
    /// It is \c 1 if the arc is involved in one of the found paths,
alpar@345
   436
    /// otherwise it is \c 0.
alpar@345
   437
    ///
alpar@345
   438
    /// \pre \ref run() or findFlow() must be called before using this
alpar@345
   439
    /// function.
alpar@345
   440
    int flow(const Arc& arc) const {
alpar@345
   441
      return (*_flow)[arc];
alpar@345
   442
    }
alpar@345
   443
alpar@345
   444
    /// \brief Returns the potential of the given node.
alpar@345
   445
    ///
alpar@345
   446
    /// Returns the potential of the given node.
alpar@345
   447
    ///
alpar@345
   448
    /// \pre \ref run() or findFlow() must be called before using this
alpar@345
   449
    /// function.
alpar@345
   450
    Length potential(const Node& node) const {
alpar@345
   451
      return (*_potential)[node];
alpar@345
   452
    }
alpar@345
   453
alpar@345
   454
    /// \brief Returns the total length (cost) of the found paths (flow).
alpar@345
   455
    ///
alpar@345
   456
    /// Returns the total length (cost) of the found paths (flow).
alpar@345
   457
    /// The complexity of the function is \f$ O(e) \f$.
alpar@345
   458
    ///
alpar@345
   459
    /// \pre \ref run() or findFlow() must be called before using this
alpar@345
   460
    /// function.
alpar@345
   461
    Length totalLength() const {
alpar@345
   462
      Length c = 0;
alpar@345
   463
      for (ArcIt e(_graph); e != INVALID; ++e)
alpar@345
   464
        c += (*_flow)[e] * _length[e];
alpar@345
   465
      return c;
alpar@345
   466
    }
alpar@345
   467
alpar@345
   468
    /// \brief Returns the number of the found paths.
alpar@345
   469
    ///
alpar@345
   470
    /// Returns the number of the found paths.
alpar@345
   471
    ///
alpar@345
   472
    /// \pre \ref run() or findFlow() must be called before using this
alpar@345
   473
    /// function.
alpar@345
   474
    int pathNum() const {
alpar@345
   475
      return _path_num;
alpar@345
   476
    }
alpar@345
   477
alpar@345
   478
    /// \brief Returns a const reference to the specified path.
alpar@345
   479
    ///
alpar@345
   480
    /// Returns a const reference to the specified path.
alpar@345
   481
    ///
alpar@345
   482
    /// \param i The function returns the \c i-th path.
alpar@345
   483
    /// \c i must be between \c 0 and <tt>%pathNum()-1</tt>.
alpar@345
   484
    ///
alpar@345
   485
    /// \pre \ref run() or findPaths() must be called before using this
alpar@345
   486
    /// function.
alpar@345
   487
    Path path(int i) const {
alpar@345
   488
      return paths[i];
alpar@345
   489
    }
alpar@345
   490
alpar@345
   491
    /// @}
alpar@345
   492
alpar@345
   493
  }; //class Suurballe
alpar@345
   494
alpar@345
   495
  ///@}
alpar@345
   496
alpar@345
   497
} //namespace lemon
alpar@345
   498
alpar@345
   499
#endif //LEMON_SUURBALLE_H