-
Notifications
You must be signed in to change notification settings - Fork 42
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
Nested enumeration container #213
Conversation
I don't like too much the arrows. Can we change it to something easy to find in the keyboard? like
|
Ok for |
so |
Yes because I use commas. Maybe it's better without commas and using a block expression ? |
yeah, I prefer the block. It is also more common I think |
Codecov Report
@@ Coverage Diff @@
## master #213 +/- ##
==========================================
+ Coverage 85% 85.22% +0.22%
==========================================
Files 43 44 +1
Lines 2620 2659 +39
==========================================
+ Hits 2227 2266 +39
Misses 393 393
Continue to review full report at Codecov.
|
return | ||
end | ||
|
||
function _compute_values!(values, parent_pos, primes) |
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.
Can you add a small comment to this function?
src/containers/nestedenum.jl
Outdated
|
||
function _compute_values!(values, parent_pos, primes) | ||
for i in 1:length(parent_pos) | ||
factor = 1.0 |
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 it not an Int
?
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.
Would be nice to have a quick explanation saying that internally the macro builds a tree for which the nodes are indexed using prime numbers. And the interest of using prime numbers is to be able to recover all the parents of a given node.
Also, it would be nice to have a comment explaining what is what here : i, names, parent_pos, leaves, primes
O
/ \
O O
/ \ / \
O O O O
why do you need |
Structure to create a tree of duty using
UInt
instead of types. It'll allow us to haveVarData
andConstrData
bitstype.Syntax to create a tree :
Syntax to know if duty inherits from another :
@vitornesello your opinion about the syntax ?