Skip to content
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

Refactoring #36

Merged
merged 8 commits into from
Aug 3, 2019
Merged

Conversation

lo48576
Copy link
Contributor

@lo48576 lo48576 commented Aug 3, 2019

  • Improve traversing iterators.
    • Iterator internals are hidden from other modules.
    • Lowered nest level of the implementations.
  • Add types to represent and manipulate sibling nodes range.
    • SiblingsRange is a range of sibling nodes.
    • DetachedSiblingsRangeis a detached siblings node range.
      • Tirst node of the range does not have a previous sibling, and the last node of the range does not have a next sibling.
  • Add helper functions to manipulate nodes relations.
    • connect_neighbors() connects the given nodes.
    • insert_with_neighbors() inserts the given node among the given neighbors.
  • Rewrited various insertions, detach, and remove methods of NodeId.
    • They use SiblingsRange internally, and the codes are now very easy to read.
  • Added more assetions to check consistency.

Copy link
Owner

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew, that was a bunch of review. :) Thanks again, generally LGTM 🙏👍

@saschagrunert saschagrunert merged commit 4c32e90 into saschagrunert:master Aug 3, 2019
@lo48576 lo48576 deleted the feature/refactor branch August 4, 2019 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants