... | ... |
@@ -638,7 +638,8 @@ |
638 | 638 |
/// \param graph The digraph the algorithm runs on. |
639 |
/// \param arc_mixing Indicate if the arcs |
|
639 |
/// \param arc_mixing Indicate if the arcs will be stored in a |
|
640 | 640 |
/// mixed order in the internal data structure. |
641 |
/// In special cases, it could lead to better overall performance, |
|
642 |
/// but it is usually slower. Therefore it is disabled by default. |
|
643 |
|
|
641 |
/// In general, it leads to similar performance as using the original |
|
642 |
/// arc order, but it makes the algorithm more robust and in special |
|
643 |
/// cases, even significantly faster. Therefore, it is enabled by default. |
|
644 |
NetworkSimplex(const GR& graph, bool arc_mixing = true) : |
|
644 | 645 |
_graph(graph), _node_id(graph), _arc_id(graph), |
... | ... |
@@ -932,3 +933,3 @@ |
932 | 933 |
// Store the arcs in a mixed order |
933 |
int |
|
934 |
const int skip = std::max(_arc_num / _node_num, 3); |
|
934 | 935 |
int i = 0, j = 0; |
... | ... |
@@ -938,3 +939,3 @@ |
938 | 939 |
_target[i] = _node_id[_graph.target(a)]; |
939 |
if ((i += |
|
940 |
if ((i += skip) >= _arc_num) i = ++j; |
|
940 | 941 |
} |
0 comments (0 inline)