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

[SR-125] Add rotate algorithm #42747

Open
gribozavr opened this issue Dec 7, 2015 · 9 comments
Open

[SR-125] Add rotate algorithm #42747

gribozavr opened this issue Dec 7, 2015 · 9 comments

Comments

@gribozavr
Copy link
Collaborator

@gribozavr gribozavr commented Dec 7, 2015

Previous ID SR-125
Radar rdar://problem/19055052
Original Reporter @gribozavr
Type Improvement
Status Reopened
Resolution
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Improvement, NewAPIRequest, StarterBug
Assignee HarieshJay (JIRA)
Priority Medium

md5: ccc424105bba16b3f829a36e196fe08d

Issue Description:

Swift needs a rotate algorithm, equivalent to std::rotate() in C++.

@natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Mar 11, 2016

One of the implementations of rotate (for bidirectional collections) is implemented using a reverse in place algorithm—would that be a good one to add to the public API as well?

@gribozavr
Copy link
Collaborator Author

@gribozavr gribozavr commented Mar 11, 2016

I don't see why not.

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Apr 25, 2017

Comment by Félix Fischer (JIRA)

Hey Nate, are you still working on this?

I can take it for you ^^

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Apr 25, 2017

Comment by Félix Fischer (JIRA)

I just realised that your comments were from 2016 XD

Then, I'll take it

@natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Apr 25, 2017

Hi Felix - thanks for looking at this! There's an implementation of rotate in test/Prototypes/Algorithms.swift.gyb. You can take a look at that - there are a couple different approaches.

In any case, to add this to the standard library would require a Swift Evolution proposal. If you're interested in submitting one of those, you'll want to take a look at the one that was rejected for Swift 3 and the rationale there.

@belkadan
Copy link
Contributor

@belkadan belkadan commented Jul 27, 2019

Resetting assignee for all Starter Bugs not modified since 2018.

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Aug 20, 2019

Comment by Hariesh Jayanthan (JIRA)

I believe rotate has been implemented in this file.

@belkadan
Copy link
Contributor

@belkadan belkadan commented Aug 20, 2019

That's what it might look like, but that's not part of the standard library yet. (Notice it's under test/.)

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Aug 20, 2019

Comment by Hariesh Jayanthan (JIRA)

Ahhh sorry about that. I don't know how I didn't notice.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants