COIN-OR::LEMON - Graph Library

Changeset 1835:eb6c34c76501 in lemon-0.x for lemon


Ignore:
Timestamp:
11/29/05 09:40:03 (18 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2387
Message:
  • tolerance.h added
  • tolerance handler added to preflow (but not yet used!!).
Location:
lemon
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/Makefile.am

    r1833 r1835  
    88libemon_la_SOURCES = \
    99        lp_base.cc \
    10         lp_skeleton.cc
     10        lp_skeleton.cc \
     11        base.cc
    1112libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
    1213libemon_la_LDFLAGS = $(GLPK_LIBS) $(CPLEX_LIBS)
     
    7172        graph_reader.h \
    7273        graph_writer.h \
     74        tolerance.h \
    7375        bits/alteration_notifier.h \
    7476        bits/array_map.h \
  • lemon/preflow.h

    r1792 r1835  
    2323#include <lemon/error.h>
    2424#include <lemon/invalid.h>
     25#include <lemon/tolerance.h>
    2526#include <lemon/maps.h>
    2627#include <lemon/graph_utils.h>
     
    6263  template <typename Graph, typename Num,
    6364            typename CapacityMap=typename Graph::template EdgeMap<Num>,
    64             typename FlowMap=typename Graph::template EdgeMap<Num> >
     65            typename FlowMap=typename Graph::template EdgeMap<Num>,
     66            typename TOL=Tolerance<Num> >
    6567  class Preflow {
    6668  protected:
     
    7981    const CapacityMap* _capacity;
    8082    FlowMap* _flow;
     83
     84    TOL surely;
     85   
    8186    int _node_num;      //the number of nodes of G
    8287   
     
    154159    ///flowMap, resp.
    155160      Preflow(const Graph& _gr, Node _s, Node _t,
    156               const CapacityMap& _cap, FlowMap& _f) :
     161              const CapacityMap& _cap, FlowMap& _f,
     162              const TOL &tol=TOL()) :
    157163        _g(&_gr), _source(_s), _target(_t), _capacity(&_cap),
    158         _flow(&_f), _node_num(countNodes(_gr)), level(_gr), excess(_gr,0),
     164        _flow(&_f), surely(tol),
     165        _node_num(countNodes(_gr)), level(_gr), excess(_gr,0),
    159166        flow_prop(NO_FLOW), status(AFTER_NOTHING) {
    160167        if ( _source==_target )
Note: See TracChangeset for help on using the changeset viewer.