Generalization to 3D#96
Merged
amartinhuertas merged 2 commits intobulk_penalty_stabfrom Sep 2, 2024
Merged
Conversation
| end | ||
| end | ||
| bounds = [(xmin[i], xmax[i]) for i in 1:D] | ||
| point_iterator = Iterators.product([bounds[i] for i in 1:D]...) |
Member
There was a problem hiding this comment.
can't you just use here Iterators.product(bounds...) ?
| bounds = [(xmin[i], xmax[i]) for i in 1:D] | ||
| point_iterator = Iterators.product([bounds[i] for i in 1:D]...) | ||
| bounding_box_node_coords[bounding_box_node_ids[agg]] = | ||
| reduce(vcat,[Point(p...) for p in point_iterator]) |
Member
There was a problem hiding this comment.
I think a less memory hungry version of
reduce(vcat,[Point(p...) for p in point_iterator])
would be to use
reshape([Point(p...) for p in point_iterator],2^D)
Again ... not a big deal ...
Collaborator
Author
There was a problem hiding this comment.
Makes sense, thanks!
amartinhuertas
requested changes
Aug 30, 2024
Member
amartinhuertas
left a comment
There was a problem hiding this comment.
hi @amboschman ... great work! Just minor comments for improvement (mainly so that we also get familiarized with the workflow).
implemented suggested changes (by Alberto on Generalization to 3D #96)
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.
Selection of polytope type (lines 105-109) is now done via a conditional statement: is there a more elegant way to do this?