Currently, in adiar/internal/algorithms/reduce.h we accumulate all the edges that have been tainted by a node being suppressed (via. Reduction Rule 1). These edges are then added to the maximum at the very end of the algorithm.
Essentially, we over-approximate the cut in the graph by thinking the tainted edges as spanning level -∞ to ∞ next to the untainted DAG. Yet, it is sound and much closer to the DAG's structure if we instead only think the tainted edges from level i as spanning level i to ∞.
[x] Extend the node_writer with the possibility to add on-top of the current maximum (rather than taking the maximum).
[x] Design one or more unit tests in test/adiar/internal/algorithms/test_reduce.cpp, where the globally counted tainted edges are quite deep in the DAG and hence are (partially?) dominated by levels further above.
[x] Rename global_1level_cut to tainted_1level_cut and have it only live inside __reduce_level(...). At the end of processing the level, add tainted_1level_cut to the maximum cut in the node_writer (after having taking the maximum with local_1level_cut).
Currently, in adiar/internal/algorithms/reduce.h we accumulate all the edges that have been tainted by a node being suppressed (via. Reduction Rule 1). These edges are then added to the maximum at the very end of the algorithm.
Essentially, we over-approximate the cut in the graph by thinking the tainted edges as spanning level -∞ to ∞ next to the untainted DAG. Yet, it is sound and much closer to the DAG's structure if we instead only think the tainted edges from level i as spanning level i to ∞.
node_writer
with the possibility to add on-top of the current maximum (rather than taking the maximum).global_1level_cut
totainted_1level_cut
and have it only live inside__reduce_level(...)
. At the end of processing the level, addtainted_1level_cut
to the maximum cut in the node_writer (after having taking the maximum withlocal_1level_cut
).