Changeset 561:6e0525ec5355 in lemonmain for tools/dimacssolver.cc
 Timestamp:
 03/30/09 17:46:37 (12 years ago)
 Branch:
 default
 Children:
 562:538b3dd9a2c0, 1158:f37f0845cf32
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

tools/dimacssolver.cc
r532 r561 73 73 template<class Value> 74 74 void solve_max(ArgParser &ap, std::istream &is, std::ostream &, 75 DimacsDescriptor &desc)75 Value infty, DimacsDescriptor &desc) 76 76 { 77 77 bool report = !ap.given("q"); … … 81 81 Timer ti; 82 82 ti.restart(); 83 readDimacsMax(is, g, cap, s, t, desc);83 readDimacsMax(is, g, cap, s, t, infty, desc); 84 84 if(report) std::cerr << "Read the file: " << ti << '\n'; 85 85 ti.restart(); … … 116 116 DimacsDescriptor &desc) 117 117 { 118 std::stringstream iss(ap["infcap"]); 119 Value infty; 120 iss >> infty; 121 if(iss.fail()) 122 { 123 std::cerr << "Cannot interpret '" 124 << static_cast<std::string>(ap["infcap"]) << "' as infinite" 125 << std::endl; 126 exit(1); 127 } 128 118 129 switch(desc.type) 119 130 { … … 123 134 break; 124 135 case DimacsDescriptor::MAX: 125 solve_max<Value>(ap,is,os, desc);136 solve_max<Value>(ap,is,os,infty,desc); 126 137 break; 127 138 case DimacsDescriptor::SP: … … 160 171 .optionGroup("datatype","ldouble") 161 172 .onlyOneGroup("datatype") 173 .stringOption("infcap","Value used for 'very high' capacities","0") 162 174 .run(); 163 175
Note: See TracChangeset
for help on using the changeset viewer.