COIN-OR::LEMON - Graph Library

Ticket #353: 353-b6f76c95992e.patch

File 353-b6f76c95992e.patch, 2.4 KB (added by Peter Kovacs, 14 years ago)
  • lemon/network_simplex.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1267693394 -3600
    # Node ID b6f76c95992e27eff14c52f9df53527e4c2e71da
    # Parent  ab21ca0937458102b5a722069cf2bec2f82d3433
    Clarify type names in NetworkSimplex (#353)
    
    This patch clarifies the misleading effects of the renamings
    in [f3bc4e9b5f3a].
    
    diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
    a b  
    170170    // Note: vector<char> is used instead of vector<bool> for efficiency reasons
    171171
    172172    // State constants for arcs
    173     enum ArcStateEnum {
     173    enum ArcState {
    174174      STATE_UPPER = -1,
    175175      STATE_TREE  =  0,
    176176      STATE_LOWER =  1
    177177    };
    178178
     179    typedef std::vector<signed char> StateVector;
     180    // Note: vector<signed char> is used instead of vector<ArcState> for
     181    // efficiency reasons
     182
    179183  private:
    180184
    181185    // Data related to the underlying digraph
     
    215219    IntVector _last_succ;
    216220    IntVector _dirty_revs;
    217221    BoolVector _forward;
    218     BoolVector _state;
     222    StateVector _state;
    219223    int _root;
    220224
    221225    // Temporary data used in the current pivot iteration
     
    246250      const IntVector  &_source;
    247251      const IntVector  &_target;
    248252      const CostVector &_cost;
    249       const BoolVector &_state;
     253      const StateVector &_state;
    250254      const CostVector &_pi;
    251255      int &_in_arc;
    252256      int _search_arc_num;
     
    298302      const IntVector  &_source;
    299303      const IntVector  &_target;
    300304      const CostVector &_cost;
    301       const BoolVector &_state;
     305      const StateVector &_state;
    302306      const CostVector &_pi;
    303307      int &_in_arc;
    304308      int _search_arc_num;
     
    337341      const IntVector  &_source;
    338342      const IntVector  &_target;
    339343      const CostVector &_cost;
    340       const BoolVector &_state;
     344      const StateVector &_state;
    341345      const CostVector &_pi;
    342346      int &_in_arc;
    343347      int _search_arc_num;
     
    410414      const IntVector  &_source;
    411415      const IntVector  &_target;
    412416      const CostVector &_cost;
    413       const BoolVector &_state;
     417      const StateVector &_state;
    414418      const CostVector &_pi;
    415419      int &_in_arc;
    416420      int _search_arc_num;
     
    513517      const IntVector  &_source;
    514518      const IntVector  &_target;
    515519      const CostVector &_cost;
    516       const BoolVector &_state;
     520      const StateVector &_state;
    517521      const CostVector &_pi;
    518522      int &_in_arc;
    519523      int _search_arc_num;