lemon/bits/lp_id.h
changeset 2388 c6d537888fe5
parent 2363 2aabce558574
child 2391 14a343be7a5a
equal deleted inserted replaced
0:ec0706d48364 1:cb5f345a163f
    75       void eraseId(int xn) {
    75       void eraseId(int xn) {
    76         if (id_handler == 0) {
    76         if (id_handler == 0) {
    77           int fn = impl.index[xn];
    77           int fn = impl.index[xn];
    78           impl.index[xn] = impl.first_free;
    78           impl.index[xn] = impl.first_free;
    79           impl.first_free = xn;
    79           impl.first_free = xn;
    80           for(int i = fn + 1; i < (int)impl.cross.size(); ++i) {
    80           for(int i = fn + 1; i < int(impl.cross.size()); ++i) {
    81             impl.cross[i - 1] = impl.cross[i];
    81             impl.cross[i - 1] = impl.cross[i];
    82             impl.index[impl.cross[i]]--;
    82             impl.index[impl.cross[i]]--;
    83           }
    83           }
    84           impl.cross.pop_back();
    84           impl.cross.pop_back();
    85         } else {
    85         } else {
    87         }
    87         }
    88       }
    88       }
    89 
    89 
    90       void firstFloating(int& fn) const {
    90       void firstFloating(int& fn) const {
    91         fn = impl.first_index;
    91         fn = impl.first_index;
    92         if (fn == (int)impl.cross.size()) fn = -1;
    92         if (fn == int(impl.cross.size())) fn = -1;
    93       }
    93       }
    94 
    94 
    95       void nextFloating(int& fn) const {
    95       void nextFloating(int& fn) const {
    96         ++fn;
    96         ++fn;
    97         if (fn == (int)impl.cross.size()) fn = -1;
    97         if (fn == int(impl.cross.size())) fn = -1;
    98       }
    98       }
    99 
    99 
   100       void firstFix(int& xn) const {
   100       void firstFix(int& xn) const {
   101         int fn;
   101         int fn;
   102         firstFloating(fn);
   102         firstFloating(fn);