Add MFD implementation - #237
Open
wkearn wants to merge 2 commits into
Open
Conversation
Resolves TopoToolbox#236 A new file, src/mfd.c, contains the two flow routing interface functions for multiple flow direction routing. These are - flow_routing_mfd_directions - flow_routing_mfd_weights As in Dinf, the former computes a bitset of directions and also sums the gradients along the way to normalize the weights later. Once we know how many edges we have, we can allocate and compute the weights with flow_routing_mfd_weights. These tests are copied from the Dinf tests, with appropriate modifications to the flow routing subroutine. The only difference in the tests is that the sum of edge weights is permitted to be numerically different from 1.0. Some of the test case sizes were also changed for debugging purposes and have been left as they were. Signed-off-by: William Kearney <william.kearney@uni-potsdam.de>
Signed-off-by: William Kearney <william.kearney@uni-potsdam.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #236
A new file, src/mfd.c, contains the two flow routing interface functions for multiple flow direction routing. These are
As in Dinf, the former computes a bitset of directions and also sums the gradients along the way to normalize the weights later. Once we know how many edges we have, we can allocate and compute the weights with flow_routing_mfd_weights.
These tests are copied from the Dinf tests, with appropriate modifications to the flow routing subroutine.
The only difference in the tests is that the sum of edge weights is permitted to be numerically different from 1.0. Some of the test case sizes were also changed for debugging purposes and have been left as they were.
I may hold off on merging this for a little bit because I have not successfully implemented the MATLAB MFD flat resolution algorithm yet, and I want to make sure that we have all the information we need for that.