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

[WIP] Fix Issue 6718 - nWayUnion => nWayMerge, plus true nWayUnion #5620

Merged
merged 1 commit into from
Jul 17, 2017

Conversation

RazvanN7
Copy link
Collaborator

@RazvanN7 RazvanN7 commented Jul 17, 2017

This is the second part of solving the above metioned issue. Adds the function multiwayUnion which computes the true union of 2 ranges. The implementation returns the result of nWayUnion piped through uniq. This will be updated after #5619 is merged.

Next step is to add a multiwayIntersection function which computes the intersection of sets.

@dlang-bot dlang-bot added the WIP Work In Progress - not ready for review or pulling label Jul 17, 2017
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.

Some tips to help speed things up:

  • smaller, focused PRs are easier to review than big ones

  • try not to mix up refactoring or style changes with bug fixes or feature enhancements

  • provide helpful commit messages explaining the rationale behind each change

Bear in mind that large or tricky changes may require multiple rounds of review and revision.

Please see CONTRIBUTING.md for more information.

Bugzilla references

Auto-close Bugzilla Description
6718 "nWayUnion" => "nWayMerge", plus true nWayUnion

Copy link
Member

@andralex andralex left a comment

Choose a reason for hiding this comment

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

Please mind the comments - thx!

@@ -857,6 +857,46 @@ NWayUnion!(less, RangeOfRanges) nWayUnion
}

/**
Computes the intersection of multiple ranges. The input ranges are passed
Copy link
Member

Choose a reason for hiding this comment

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

s/intersection/union/

@@ -857,6 +857,46 @@ NWayUnion!(less, RangeOfRanges) nWayUnion
}

/**
Computes the intersection of multiple ranges. The input ranges are passed
as a range of ranges and each is assumed to be sorted by $(D
less). Computation is done lazily, one intersection element at a time.
Copy link
Member

Choose a reason for hiding this comment

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

s/intersection/union/

as a range of ranges and each is assumed to be sorted by $(D
less). Computation is done lazily, one intersection element at a time.
The `multiwayUnion` function is implemented by piping the result
of $(LREF nWayUnion) through $(REF uniq std,algorithm,iteration).
Copy link
Member

Choose a reason for hiding this comment

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

Delete this, we don't need to make such guarantees of implementation. Just say "multiwayUnion(ror) is functionally equivalent to multiwayMerge(ror).uniq".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Roger.

@RazvanN7
Copy link
Collaborator Author

@andralex I suggest the following timeline:

  1. Merge Rename nWayUnion => multiwayMerge and NWayUnion => MultiwayMerge #5619
  2. Merge this
  3. I will create another PR with the implementation of multiwayIntersection
  4. Merge that one

Doing so we will close the bug issue after this is merged and all PRs will have focused targets.

What do you say?

@wilzbach
Copy link
Member

Q: Why do we need the nWay prefixes? Can't this by added to merge as variadic overload?

@andralex
Copy link
Member

Hmmm... this seems to be stuck in circleci.

@wilzbach wilzbach closed this Jul 17, 2017
@wilzbach wilzbach reopened this Jul 17, 2017
@wilzbach
Copy link
Member

this seems to be stuck in circleci.

Jenkins isn't even appearing, so it seems like a GitHub issue...

@dlang-bot dlang-bot merged commit bdae5f0 into dlang:master Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Bug Fix WIP Work In Progress - not ready for review or pulling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants