COIN-OR::LEMON - Graph Library

Changeset 2386:81b47fc5c444 in lemon-0.x for lemon/radix_heap.h


Ignore:
Timestamp:
03/02/07 19:04:28 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3217
Message:

Hard Warning checking

  • based on the remark of the ZIB user
  • we do not use -Winline
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/radix_heap.h

    r2263 r2386  
    151151  private:
    152152
    153     bool upper(int box, Prio prio) {
    154       return prio < boxes[box].min;
    155     }
    156 
    157     bool lower(int box, Prio prio) {
    158       return prio >= boxes[box].min + boxes[box].size;
     153    bool upper(int box, Prio pr) {
     154      return pr < boxes[box].min;
     155    }
     156
     157    bool lower(int box, Prio pr) {
     158      return pr >= boxes[box].min + boxes[box].size;
    159159    }
    160160
     
    188188    void extend() {
    189189      int min = boxes.back().min + boxes.back().size;
    190       int size = 2 * boxes.back().size;
    191       boxes.push_back(RadixBox(min, size));
     190      int bs = 2 * boxes.back().size;
     191      boxes.push_back(RadixBox(min, bs));
    192192    }
    193193
     
    201201
    202202    /// \brief Find up the proper box for the item with the given prio.
    203     int findUp(int start, int prio) {
    204       while (lower(start, prio)) {
    205         if (++start == (int)boxes.size()) {
     203    int findUp(int start, int pr) {
     204      while (lower(start, pr)) {
     205        if (++start == int(boxes.size())) {
    206206          extend();
    207207        }
     
    219219
    220220    /// \brief Find up the proper box for the item with the given prio.
    221     int findDown(int start, int prio) {
    222       while (upper(start, prio)) {
     221    int findDown(int start, int pr) {
     222      while (upper(start, pr)) {
    223223        if (--start < 0) throw UnderFlowPriorityError();
    224224      }
     
    261261
    262262    void relocate_last(int index) {
    263       if (index != (int)data.size() - 1) {
     263      if (index != int(data.size()) - 1) {
    264264        data[index] = data.back();
    265265        if (data[index].prev != -1) {
Note: See TracChangeset for help on using the changeset viewer.