-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate arcMap generation from writing to file #4
base: master
Are you sure you want to change the base?
Conversation
This should be backwards-compatible so no dependent projects would break due to this. |
std::vector<int64_t> nodeids; | ||
std::vector<scalar_t> nodefns; | ||
std::vector<char> nodeTypes; | ||
std::vector<int64_t> arcs; | ||
|
||
arcMap.resize(nv, -1); | ||
|
||
uint32_t arcNo = 0; | ||
for (int64_t i = 0; i < nv; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a nested loop here?
@@ -145,6 +145,7 @@ ContourTree::computeArcMap() { | |||
|
|||
return {arcNo, nodeids, nodefns, nodeTypes, arcs}; | |||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this added because of the additional loop? Based in this, the return statement is anyway inside the second loop. Was the first loop a copy paste error?
I separated the generation of the arcMap from writing it to file since writing to file might not be needed. One could instead directly work with the arcMap.