# HG changeset patch
# User "Janos Tapolcai <tapolcai@tmit.bme.hu>"
# Date 1232732441 -3600
# Node ID 67d4e07336d77842843bdbed2a3d2f7c534c2610
# Parent 939d0f436ebe9e8c5f1d5468b004b6f1ab34c1f7
bugfix on ticket 209
diff --git a/lemon/lp_base.h b/lemon/lp_base.h
a
|
b
|
|
1391 | 1391 | template<class T> |
1392 | 1392 | void colUpperBound(T &t, Value value) { return 0;} |
1393 | 1393 | #else |
1394 | | template<class T> |
1395 | | typename enable_if<typename T::value_type::LpCol,void>::type |
1396 | | colUpperBound(T &t, Value value,dummy<0> = 0) { |
1397 | | for(typename T::iterator i=t.begin();i!=t.end();++i) { |
| 1394 | template<class T1> |
| 1395 | typename enable_if<typename T1::value_type::LpCol,void>::type |
| 1396 | colUpperBound(T1 &t, Value value,dummy<0> = 0) { |
| 1397 | for(typename T1::iterator i=t.begin();i!=t.end();++i) { |
1398 | 1398 | colUpperBound(*i, value); |
1399 | 1399 | } |
1400 | 1400 | } |
1401 | | template<class T> |
1402 | | typename enable_if<typename T::value_type::second_type::LpCol, |
| 1401 | template<class T1> |
| 1402 | typename enable_if<typename T1::value_type::second_type::LpCol, |
1403 | 1403 | void>::type |
1404 | | colUpperBound(T &t, Value value,dummy<1> = 1) { |
1405 | | for(typename T::iterator i=t.begin();i!=t.end();++i) { |
| 1404 | colUpperBound(T1 &t, Value value,dummy<1> = 1) { |
| 1405 | for(typename T1::iterator i=t.begin();i!=t.end();++i) { |
1406 | 1406 | colUpperBound(i->second, value); |
1407 | 1407 | } |
1408 | 1408 | } |
1409 | | template<class T> |
1410 | | typename enable_if<typename T::MapIt::Value::LpCol, |
| 1409 | template<class T1> |
| 1410 | typename enable_if<typename T1::MapIt::Value::LpCol, |
1411 | 1411 | void>::type |
1412 | | colUpperBound(T &t, Value value,dummy<2> = 2) { |
1413 | | for(typename T::MapIt i(t); i!=INVALID; ++i){ |
| 1412 | colUpperBound(T1 &t, Value value,dummy<2> = 2) { |
| 1413 | for(typename T1::MapIt i(t); i!=INVALID; ++i){ |
1414 | 1414 | colUpperBound(*i, value); |
1415 | 1415 | } |
1416 | 1416 | } |
… |
… |
|
1440 | 1440 | template<class T> |
1441 | 1441 | void colBounds(T &t, Value lower, Value upper) { return 0;} |
1442 | 1442 | #else |
1443 | | template<class T> |
1444 | | typename enable_if<typename T::value_type::LpCol,void>::type |
1445 | | colBounds(T &t, Value lower, Value upper,dummy<0> = 0) { |
1446 | | for(typename T::iterator i=t.begin();i!=t.end();++i) { |
| 1443 | template<class T2> |
| 1444 | typename enable_if<typename T2::value_type::LpCol,void>::type |
| 1445 | colBounds(T2 &t, Value lower, Value upper,dummy<0> = 0) { |
| 1446 | for(typename T2::iterator i=t.begin();i!=t.end();++i) { |
1447 | 1447 | colBounds(*i, lower, upper); |
1448 | 1448 | } |
1449 | 1449 | } |
1450 | | template<class T> |
1451 | | typename enable_if<typename T::value_type::second_type::LpCol, void>::type |
1452 | | colBounds(T &t, Value lower, Value upper,dummy<1> = 1) { |
1453 | | for(typename T::iterator i=t.begin();i!=t.end();++i) { |
| 1450 | template<class T2> |
| 1451 | typename enable_if<typename T2::value_type::second_type::LpCol, void>::type |
| 1452 | colBounds(T2 &t, Value lower, Value upper,dummy<1> = 1) { |
| 1453 | for(typename T2::iterator i=t.begin();i!=t.end();++i) { |
1454 | 1454 | colBounds(i->second, lower, upper); |
1455 | 1455 | } |
1456 | 1456 | } |
1457 | | template<class T> |
1458 | | typename enable_if<typename T::MapIt::Value::LpCol, void>::type |
1459 | | colBounds(T &t, Value lower, Value upper,dummy<2> = 2) { |
1460 | | for(typename T::MapIt i(t); i!=INVALID; ++i){ |
| 1457 | template<class T2> |
| 1458 | typename enable_if<typename T2::MapIt::Value::LpCol, void>::type |
| 1459 | colBounds(T2 &t, Value lower, Value upper,dummy<2> = 2) { |
| 1460 | for(typename T2::MapIt i(t); i!=INVALID; ++i){ |
1461 | 1461 | colBounds(*i, lower, upper); |
1462 | 1462 | } |
1463 | 1463 | } |