Skip to content

Replace flow_accumulation_edgelist with traverse_down_f32_add_mul#70

Open
wkearn wants to merge 1 commit intoTopoToolbox:mainfrom
wkearn:traverse_down_f32_add_mul
Open

Replace flow_accumulation_edgelist with traverse_down_f32_add_mul#70
wkearn wants to merge 1 commit intoTopoToolbox:mainfrom
wkearn:traverse_down_f32_add_mul

Conversation

@wkearn
Copy link
Copy Markdown
Member

@wkearn wkearn commented Mar 6, 2026

Resolves #67

See TopoToolbox/libtopotoolbox#212

libtopotoolbox intends to deprecate and remove
flow_accumulation_edgelist in favor of the flow algebra traverse_down_f32_add_mul. This PR wraps the traverse function and modifies flow_accumulation to use the latter.

The main change in R code is that the output argument is initialized with the input weights instead of requiring a separate output array to be allocated.

I also renamed wrap_flow_accumulation.c to wrap_streamquad.c to match the libtopotoolbox naming. I assume we could add other functions from libtopotoolbox's streamquad.c to this file.

The existing flow accumulation tests should still pass with this change.

Resolves TopoToolbox#67

See TopoToolbox/libtopotoolbox#212

libtopotoolbox intends to deprecate and remove
`flow_accumulation_edgelist` in favor of the flow algebra
`traverse_down_f32_add_mul`. This PR wraps the traverse function and
modifies `flow_accumulation` to use the latter.

The main change in R code is that the output argument is initialized
with the input weights instead of requiring a separate output array to
be allocated.

I also renamed `wrap_flow_accumulation.c` to `wrap_streamquad.c` to
match the libtopotoolbox naming. I assume we could add other functions
from libtopotoolbox's `streamquad.c` to this file.

The existing flow accumulation tests should still pass with this
change.

Signed-off-by: William Kearney <william.kearney@uni-potsdam.de>
@wkearn wkearn requested a review from ktlenz March 6, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace flow_accumulation with traverse_down_f32_add_mul

1 participant