Giter Club home page Giter Club logo

algorithm-spiralmatrix's Introduction

Algorithm::SpiralMatrix

Various Raku Sequences for spirals in matrix (two-dimensional arrays).

For overview see docs/test-output.md and docs/distance-variants.md.

Synopsis

use Algorithm::SpiralMatrix;

my $i = 1;
for square_distance(order => 'clockwise') -> ($x,$y) {
    say "{$i++} $x,$y";
    last if $i > 25;
}

will print

1 0,0
2 0,-1
3 1,0
4 0,1
5 -1,0
6 1,-1
8 -1,1
9 -1,-1
...
24 -2,2
25 -2,-2

Description

This module provides implementation of algorithms to generate various spiral sequences in matrix (two-dimensional array).

Related links

Installation

Rakudo Raku distribution contains zef. Use

zef install Algorithm::SpiralMatrix

If you have a local copy of this repository use

zef install .

in the module directory.

Support

Feel free to share your suggestions, patches or comment https://github.com/mj41/Algorithm-SpiralMatrix/issues.

Licence and Copyright

This is free software. Please see the LICENCE file.

© Michal Jurosz, 2019

algorithm-spiralmatrix's People

Contributors

mj41 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

algorithm-spiralmatrix's Issues

Tests will fail on next release of Rakudo (2021.10)

The reason for this is that rakudo/rakudo@a86ec91 fixed an issue with List.fmt, which is used by the test logic of this module. This causes test failures now.

I would suggest using using tests with is-deeply rather than depending on stringification.

Please let me know if you can find time to fix this before the 2021.10 release in a week. If not, I will try to find some time to create a PR to fix the issue.

Thank your for any time you can give to this. And thanks for a nice module as well! :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.