COIN-OR::LEMON - Graph Library

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


Ignore:
Timestamp:
03/02/07 19:04:28 (13 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/nagamochi_ibaraki.h

    r2376 r2386  
    439439    /// automatically allocated map, of course.
    440440    /// \return <tt> (*this) </tt>
    441     MaxCardinalitySearch &heap(Heap& heap, HeapCrossRef &crossRef) {
     441    MaxCardinalitySearch &heap(Heap& hp, HeapCrossRef &cr) {
    442442      if(local_heap_cross_ref) {
    443443        delete _heap_cross_ref;
    444444        local_heap_cross_ref = false;
    445445      }
    446       _heap_cross_ref = &crossRef;
     446      _heap_cross_ref = &cr;
    447447      if(local_heap) {
    448448        delete _heap;
    449449        local_heap = false;
    450450      }
    451       _heap = &heap;
     451      _heap = &hp;
    452452      return *this;
    453453    }
     
    11691169    /// automatically allocated heap and cross reference, of course.
    11701170    /// \return <tt> (*this) </tt>
    1171     NagamochiIbaraki &heap(Heap& heap, HeapCrossRef &crossRef)
     1171    NagamochiIbaraki &heap(Heap& hp, HeapCrossRef &cr)
    11721172    {
    11731173      if (local_heap_cross_ref) {
     
    11751175        local_heap_cross_ref=false;
    11761176      }
    1177       _heap_cross_ref = &crossRef;
     1177      _heap_cross_ref = &cr;
    11781178      if (local_heap) {
    11791179        delete _heap;
    11801180        local_heap=false;
    11811181      }
    1182       _heap = &heap;
     1182      _heap = &hp;
    11831183      return *this;
    11841184    }
     
    13191319      }
    13201320
    1321       if ((int)nodes.size() < _node_num) {
     1321      if (int(nodes.size()) < _node_num) {
    13221322        _aux_graph->clear();
    13231323        _node_num = 1;
    13241324        _cut.clear();
    1325         for (int i = 0; i < (int)nodes.size(); ++i) {
     1325        for (int i = 0; i < int(nodes.size()); ++i) {
    13261326          typename Graph::Node n = (*_first)[nodes[i]];
    13271327          while (n != INVALID) {
     
    13611361      }
    13621362
    1363       if (ufe.size((typename Ufe::ClassIt)(ufe)) == _node_num) {
     1363      typedef typename Ufe::ClassIt UfeCIt;
     1364      if (ufe.size(UfeCIt(ufe)) == _node_num) {
    13641365        _aux_graph->clear();
    13651366        _node_num = 1;
     
    13731374        if (ufe.size(c) == 1) continue;
    13741375        for (typename Ufe::ItemIt r(ufe, c); r != INVALID; ++r) {
    1375           if ((Node)r == (Node)c) continue;
     1376          if (static_cast<Node>(r) == static_cast<Node>(c)) continue;
    13761377          _next->set((*_last)[c], (*_first)[r]);
    13771378          _last->set(c, (*_last)[r]);
     
    14081409      }
    14091410
    1410       for (int i = 0; i < (int)remedges.size(); ++i) {
     1411      for (int i = 0; i < int(remedges.size()); ++i) {
    14111412        _aux_graph->erase(remedges[i]);
    14121413      }
     
    14161417      {
    14171418        int i = 0;
    1418         while (i < (int)addedges.size()) {
     1419        while (i < int(addedges.size())) {
    14191420          Node sn = addedges[i].source;
    14201421          Node tn = addedges[i].target;
    14211422          Value ec = addedges[i].capacity;
    14221423          ++i;
    1423           while (i < (int)addedges.size() &&
     1424          while (i < int(addedges.size()) &&
    14241425                 sn == addedges[i].source && tn == addedges[i].target) {
    14251426            ec += addedges[i].capacity;
     
    14431444      }
    14441445
    1445       for (int i = 0; i < (int)remnodes.size(); ++i) {
     1446      for (int i = 0; i < int(remnodes.size()); ++i) {
    14461447        _aux_graph->erase(remnodes[i]);
    14471448      }
     
    15011502    template <typename NodeMap>
    15021503    Value quickMinCut(NodeMap& nodeMap) const {
    1503       for (int i = 0; i < (int)_cut.size(); ++i) {
     1504      for (int i = 0; i < int(_cut.size()); ++i) {
    15041505        nodeMap.set(_cut[i], true);
    15051506      }
Note: See TracChangeset for help on using the changeset viewer.