COIN-OR::LEMON - Graph Library

Changes in / [780:580af8cf2f6a:782:ceb2756dea2a] in lemon-main


Ignore:
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/bellman_ford.h

    r699 r781  
    2424/// \brief Bellman-Ford algorithm.
    2525
     26#include <lemon/list_graph.h>
    2627#include <lemon/bits/path_dump.h>
    2728#include <lemon/core.h>
     
    776777    /// length if the algorithm has already found one.
    777778    /// Otherwise it gives back an empty path.
    778     lemon::Path<Digraph> negativeCycle() {
     779    lemon::Path<Digraph> negativeCycle() const {
    779780      typename Digraph::template NodeMap<int> state(*_gr, -1);
    780781      lemon::Path<Digraph> cycle;
  • test/bellman_ford_test.cc

    r699 r781  
    9797    p  = const_bf_test.predMap();
    9898    pp = const_bf_test.path(t);
     99    pp = const_bf_test.negativeCycle();
    99100   
    100101    for (BF::ActiveIt it(const_bf_test); it != INVALID; ++it) {}
     
    133134    b  = bf_test.reached(t);
    134135    pp = bf_test.path(t);
     136    pp = bf_test.negativeCycle();
    135137  }
    136138}
Note: See TracChangeset for help on using the changeset viewer.