-
Notifications
You must be signed in to change notification settings - Fork 35
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
Naming change for NodeIndex
#208
Comments
I personally find the matrix terminology harder to understand. I have been using the following terminology:
Besides the I also find it confusing that our code doesn't have an enum to determine the orientation of a tree walk when checking bits. Something like To summarize the above, I think we should:
|
For I don't see an issue with the I think other changes that @hackaugusto mentioned should go into a different issue. |
I find the naming around
NodeIndex
confusing (i.e. "index", "depth" and "value"). Currently, every time I encounter aNodeIndex
, I have to remind myself e.g. whatvalue
is, which is distracting.I can currently think of 2 alternatives for renaming.
Reusing matrix terminology
We could reuse matrix terminology, so the renaming would look like:
NodeIndex
->NodeCoordinate
orNodeCoord
depth
->i
value
->j
I'm not really against keeping
NodeIndex
, although I typically think of "indices" as being 1-dimensional, and "coordinates" as being 2D+.Changing only
value
A less important change would only change
value
.NodeIndex
->NodeCoordinate
,NodeCoord
orNodeIndex
depth
->depth
value
->width
depth
makes it clear that the "y coordinate" starts from the top, andwidth
tries to capture "x coordinate" (from how we usually use "width" with a rectangle).The depth/width terminology is probably more descriptive, so I would personally go in that direction.
The text was updated successfully, but these errors were encountered: