COIN-OR::LEMON - Graph Library

Changeset 618:b95898314e09 in lemon-1.2 for lemon


Ignore:
Timestamp:
04/24/09 13:12:14 (15 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
622:28f58740b6f8, 625:029a48052c67
Parents:
617:4137ef9aacc6 (diff), 615:e3d9bff447ed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/network_simplex.h

    r613 r618  
    382382        const int MIN_BLOCK_SIZE = 10;
    383383
    384         _block_size = std::max( int(BLOCK_SIZE_FACTOR * sqrt(_arc_num)),
     384        _block_size = std::max( int(BLOCK_SIZE_FACTOR *
     385                                    std::sqrt(double(_arc_num))),
    385386                                MIN_BLOCK_SIZE );
    386387      }
     
    458459        const int MIN_MINOR_LIMIT = 3;
    459460
    460         _list_length = std::max( int(LIST_LENGTH_FACTOR * sqrt(_arc_num)),
     461        _list_length = std::max( int(LIST_LENGTH_FACTOR *
     462                                     std::sqrt(double(_arc_num))),
    461463                                 MIN_LIST_LENGTH );
    462464        _minor_limit = std::max( int(MINOR_LIMIT_FACTOR * _list_length),
     
    578580        const int MIN_HEAD_LENGTH = 3;
    579581
    580         _block_size = std::max( int(BLOCK_SIZE_FACTOR * sqrt(_arc_num)),
     582        _block_size = std::max( int(BLOCK_SIZE_FACTOR *
     583                                    std::sqrt(double(_arc_num))),
    581584                                MIN_BLOCK_SIZE );
    582585        _head_length = std::max( int(HEAD_LENGTH_FACTOR * _block_size),
     
    12271230
    12281231      // Store the arcs in a mixed order
    1229       int k = std::max(int(sqrt(_arc_num)), 10);
     1232      int k = std::max(int(std::sqrt(double(_arc_num))), 10);
    12301233      int i = 0;
    12311234      for (ArcIt e(_graph); e != INVALID; ++e) {
  • lemon/network_simplex.h

    r612 r618  
    11481148      // Run Circulation to check if a feasible solution exists
    11491149      typedef ConstMap<Arc, Flow> ConstArcMap;
     1150      ConstArcMap zero_arc_map(0), inf_arc_map(inf_cap);
    11501151      FlowNodeMap *csup = NULL;
    11511152      bool local_csup = false;
     
    11681169          } else {
    11691170            Circulation<GR, FlowArcMap, ConstArcMap, FlowNodeMap>
    1170               circ(_graph, *_plower, ConstArcMap(inf_cap), *csup);
     1171              circ(_graph, *_plower, inf_arc_map, *csup);
    11711172            circ_result = circ.run();
    11721173          }
     
    11741175          if (_pupper) {
    11751176            Circulation<GR, ConstArcMap, FlowArcMap, FlowNodeMap>
    1176               circ(_graph, ConstArcMap(0), *_pupper, *csup);
     1177              circ(_graph, zero_arc_map, *_pupper, *csup);
    11771178            circ_result = circ.run();
    11781179          } else {
    11791180            Circulation<GR, ConstArcMap, ConstArcMap, FlowNodeMap>
    1180               circ(_graph, ConstArcMap(0), ConstArcMap(inf_cap), *csup);
     1181              circ(_graph, zero_arc_map, inf_arc_map, *csup);
    11811182            circ_result = circ.run();
    11821183          }
     
    11951196          } else {
    11961197            Circulation<RevGraph, FlowArcMap, ConstArcMap, NegNodeMap>
    1197               circ(rgraph, *_plower, ConstArcMap(inf_cap), neg_csup);
     1198              circ(rgraph, *_plower, inf_arc_map, neg_csup);
    11981199            circ_result = circ.run();
    11991200          }
     
    12011202          if (_pupper) {
    12021203            Circulation<RevGraph, ConstArcMap, FlowArcMap, NegNodeMap>
    1203               circ(rgraph, ConstArcMap(0), *_pupper, neg_csup);
     1204              circ(rgraph, zero_arc_map, *_pupper, neg_csup);
    12041205            circ_result = circ.run();
    12051206          } else {
    12061207            Circulation<RevGraph, ConstArcMap, ConstArcMap, NegNodeMap>
    1207               circ(rgraph, ConstArcMap(0), ConstArcMap(inf_cap), neg_csup);
     1208              circ(rgraph, zero_arc_map, inf_arc_map, neg_csup);
    12081209            circ_result = circ.run();
    12091210          }
Note: See TracChangeset for help on using the changeset viewer.