https://github.com/sadit/arrayrotations.jl
Block swapping algorithms (rotations)
https://github.com/sadit/arrayrotations.jl
Last synced: 3 days ago
JSON representation
Block swapping algorithms (rotations)
- Host: GitHub
- URL: https://github.com/sadit/arrayrotations.jl
- Owner: sadit
- License: mit
- Created: 2022-02-22T23:01:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-26T00:17:26.000Z (almost 4 years ago)
- Last Synced: 2025-02-20T17:26:17.674Z (10 months ago)
- Language: Julia
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Array rotations
A small package with array rotation algorithms (block swap). Only 1D arrays (vectors).
## Usage:
Call `rotate!(rot::Rotation, A::AbstractVector, tailpos::Integer)` to rotate the array `A` on the given tail position.
A few algorithms are implemented:
- AuxRotation: rotates using at most n/2 extra memory
- BridgeRotation: rotates using at most n/3 extra memory
- RevRotation: rotates using O(1) extra memory
- GriesMillsRotation: Gries Mills algorithm, rotates using O(1) extra memory