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

[DSSv3] Fix Issue 13684 - std.numeric.isRectangular #8175

Closed
wants to merge 3 commits into from

Conversation

lucica28
Copy link
Contributor

Added new function isRectangular

@lucica28 lucica28 requested a review from andralex as a code owner July 22, 2021 17:52
@dlang-bot
Copy link
Contributor

dlang-bot commented Jul 22, 2021

Thanks for your pull request and interest in making D better, @lucica28! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
13684 enhancement std.numeric.isRectangular

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8175"

Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

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

Retitle the commit message to say "Fix issue 13684 - add std.numeric.isRectangular"

@@ -1121,6 +1121,57 @@ T findRoot(T, DF)(scope DF f, const T a, const T b)
return findRoot(f, a, b, (T a, T b) => false);
}

bool isRectangular(T)(T arr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs documentation

@lucica28 lucica28 changed the title Fixing Issue 13684 - std.numeric.isRectangular Fix Issue 13684 - std.numeric.isRectangular Jul 23, 2021
@RazvanN7
Copy link
Collaborator

The commit message should contain the string "Fix Issue 13684 - ..." so that the bot picks it up. Upon merger, the bot will then automatically close the issue.

@RazvanN7 RazvanN7 changed the title Fix Issue 13684 - std.numeric.isRectangular [DSSv3] Fix Issue 13684 - std.numeric.isRectangular Jul 23, 2021
@kinke
Copy link
Contributor

kinke commented Jul 25, 2021

I don't think Phobos needs such a function; it may encourage people to think jagged arrays (arrays of arrays) are a reasonable way to represent such rectangular multidimensional arrays, while we have a much better suited library for that: http://mir-algorithm.libmir.org/mir_ndslice.html

Using join() for the recursion and thus requiring potentially huge temporary buffers for such a check is bad.

@PetarKirov PetarKirov added the DSS D Summer School label Jul 26, 2021
@RazvanN7
Copy link
Collaborator

@lucica28 As per @kinke 's comment I am going to close this PR. Feel free to close the issue as WONTFIX.

@RazvanN7 RazvanN7 closed this Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants