lemon/network_simplex.h
changeset 649 76cbcb3e9bbb
parent 642 111698359429
child 663 8b0df68370a4
equal deleted inserted replaced
13:9c7a4c1327ef 14:48bb94977009
  1043       // Check the sum of supply values
  1043       // Check the sum of supply values
  1044       _sum_supply = 0;
  1044       _sum_supply = 0;
  1045       for (int i = 0; i != _node_num; ++i) {
  1045       for (int i = 0; i != _node_num; ++i) {
  1046         _sum_supply += _supply[i];
  1046         _sum_supply += _supply[i];
  1047       }
  1047       }
  1048       if ( !(_stype == GEQ && _sum_supply <= 0 ||
  1048       if ( !((_stype == GEQ && _sum_supply <= 0) ||
  1049              _stype == LEQ && _sum_supply >= 0) ) return false;
  1049              (_stype == LEQ && _sum_supply >= 0)) ) return false;
  1050 
  1050 
  1051       // Remove non-zero lower bounds
  1051       // Remove non-zero lower bounds
  1052       if (_have_lower) {
  1052       if (_have_lower) {
  1053         for (int i = 0; i != _arc_num; ++i) {
  1053         for (int i = 0; i != _arc_num; ++i) {
  1054           Value c = _lower[i];
  1054           Value c = _lower[i];