src/hugo/dimacs.h
changeset 865 2f3f87afb1d2
parent 778 08a1d1e3070d
child 903 2e664d4969d7
equal deleted inserted replaced
4:86ecf40798e0 5:18d9c68c6824
    69       case 'a':
    69       case 'a':
    70 	if ( problem == "max" || problem == "sp") {
    70 	if ( problem == "max" || problem == "sp") {
    71 	  is >> i >> j >> _cap;
    71 	  is >> i >> j >> _cap;
    72 	  getline(is, str);
    72 	  getline(is, str);
    73 	  e=g.addEdge(nodes[i], nodes[j]);
    73 	  e=g.addEdge(nodes[i], nodes[j]);
    74 	  capacity.update();
    74 	  //capacity.update();
    75 	  capacity.set(e, _cap);
    75 	  capacity.set(e, _cap);
    76 	} else {
    76 	} else {
    77 	  if ( problem == "min" ) {
    77 	  if ( problem == "min" ) {
    78 	    is >> i >> j >> _cap >> _cost;
    78 	    is >> i >> j >> _cap >> _cost;
    79 	    getline(is, str);
    79 	    getline(is, str);
    80 	    e=g.addEdge(nodes[i], nodes[j]);
    80 	    e=g.addEdge(nodes[i], nodes[j]);
    81 	    capacity.update();
    81 	    //capacity.update();
    82 	    capacity.set(e, _cap);
    82 	    capacity.set(e, _cap);
    83 	    cost.update();
    83 	    //cost.update();
    84 	    cost.set(e, _cost);
    84 	    cost.set(e, _cost);
    85 	  } else {
    85 	  } else {
    86 	    is >> i >> j;
    86 	    is >> i >> j;
    87 	    getline(is, str);
    87 	    getline(is, str);
    88 	    g.addEdge(nodes[i], nodes[j]);
    88 	    g.addEdge(nodes[i], nodes[j]);