COIN-OR::LEMON - Graph Library

Changeset 1864:1788205e36af in lemon-0.x for lemon/johnson.h


Ignore:
Timestamp:
12/19/05 10:43:13 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2436
Message:

Fixing Bellman's name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/johnson.h

    r1784 r1864  
    2626#include <lemon/graph_utils.h>
    2727#include <lemon/dijkstra.h>
    28 #include <lemon/belmann_ford.h>
     28#include <lemon/bellman_ford.h>
    2929#include <lemon/invalid.h>
    3030#include <lemon/error.h>
     
    101101    typedef typename _LengthMap::Value Value;
    102102
    103     /// \brief Operation traits for belmann-ford algorithm.
     103    /// \brief Operation traits for bellman-ford algorithm.
    104104    ///
    105105    /// It defines the infinity type on the given Value type
     
    545545    void start() {
    546546
    547       typedef typename BelmannFord<Graph, LengthMap>::
     547      typedef typename BellmanFord<Graph, LengthMap>::
    548548      template DefOperationTraits<OperationTraits>::
    549549      template DefPredMap<NullMap<Node, Edge> >::
    550       Create BelmannFordType;
     550      Create BellmanFordType;
    551551     
    552       BelmannFordType belmannford(*graph, *length);
     552      BellmanFordType bellmanford(*graph, *length);
    553553
    554554      NullMap<Node, Edge> predMap;
    555555
    556       belmannford.predMap(predMap);
     556      bellmanford.predMap(predMap);
    557557     
    558       belmannford.init(OperationTraits::zero());
    559       belmannford.start();
    560 
    561       shiftedRun(belmannford.distMap());
     558      bellmanford.init(OperationTraits::zero());
     559      bellmanford.start();
     560
     561      shiftedRun(bellmanford.distMap());
    562562    }
    563563
     
    572572    bool checkedStart() {
    573573     
    574       typedef typename BelmannFord<Graph, LengthMap>::
     574      typedef typename BellmanFord<Graph, LengthMap>::
    575575      template DefOperationTraits<OperationTraits>::
    576576      template DefPredMap<NullMap<Node, Edge> >::
    577       Create BelmannFordType;
    578 
    579       BelmannFordType belmannford(*graph, *length);
     577      Create BellmanFordType;
     578
     579      BellmanFordType bellmanford(*graph, *length);
    580580
    581581      NullMap<Node, Edge> predMap;
    582582
    583       belmannford.predMap(predMap);
     583      bellmanford.predMap(predMap);
    584584     
    585       belmannford.init(OperationTraits::zero());
    586       if (!belmannford.checkedStart()) return false;
    587 
    588       shiftedRun(belmannford.distMap());
     585      bellmanford.init(OperationTraits::zero());
     586      if (!bellmanford.checkedStart()) return false;
     587
     588      shiftedRun(bellmanford.distMap());
    589589      return true;
    590590    }
Note: See TracChangeset for help on using the changeset viewer.