COIN-OR::LEMON - Graph Library

Changeset 1810:474d093466a5 in lemon-0.x for lemon/lp_base.h


Ignore:
Timestamp:
11/16/05 19:58:10 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2355
Message:

Modified iterators on graph maps
Other iterators for not graph maps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/lp_base.h

    r1787 r1810  
    682682    }
    683683    template<class T>
    684     typename enable_if<typename T::ValueSet::value_type::LpSolverCol,
     684    typename enable_if<typename T::MapIt::Value::LpSolverCol,
    685685                       int>::type
    686686    addColSet(T &t,dummy<2> = 2) {
    687       ///\bug <tt>return addColSet(t.valueSet());</tt> should also work.
    688687      int s=0;
    689       for(typename T::ValueSet::iterator i=t.valueSet().begin();
    690           i!=t.valueSet().end();
    691           ++i)
     688      for(typename T::MapIt i(t); i!=INVALID; ++i)
    692689        {
    693           *i=addCol();
     690          i.set(addCol());
    694691          s++;
    695692        }
     
    788785    }
    789786    template<class T>
    790     typename enable_if<typename T::ValueSet::value_type::LpSolverRow,
     787    typename enable_if<typename T::MapIt::Value::LpSolverRow,
    791788                       int>::type
    792789    addRowSet(T &t,dummy<2> = 2) {
    793       ///\bug <tt>return addRowSet(t.valueSet());</tt> should also work.
    794790      int s=0;
    795       for(typename T::ValueSet::iterator i=t.valueSet().begin();
    796           i!=t.valueSet().end();
    797           ++i)
     791      for(typename T::MapIt i(t); i!=INVALID; ++i)
    798792        {
    799           *i=addRow();
     793          i.set(addRow());
    800794          s++;
    801795        }
Note: See TracChangeset for help on using the changeset viewer.