Git Product home page Git Product logo

list-permutor-repeat's Introduction

NAME

List::Permutor::Repeat - Process all possible repeat permutations of a list

组合数学,可重复排列

SYNOPSIS

use List::Permutor::Repeat;
my $perm = new List::Permutor::Repeat qw/ a b /;
while (my @set = $perm->next) {
    print @set, "\n";
}

#aa
#ab
#ba
#bb
 

DESCRIPTION

This is repeat permutation.

Not repeat elem permutation see Tom Phoenix's List::Permutor.

METHODS

new LIST

初始化,传入一个数组

Returns a permutor for the given items.

next

取出下一个可重复的排列

Returns a list of the items in the next permutation.

for example, the repeat permutations of (1..5) first: (1, 1, 1, 1, 1) last: (5, 5, 5, 5, 5)

peek

取回当前的排列

Returns the list of items which would be returned by next()

reset

重置排列,从头开始

Resets the iterator to the start.

AUTHOR

Abby Pan <[email protected]>

The object oriented interface/method is taken from Tom Phoenix's List::Permutor.

list-permutor-repeat's People

Contributors

abbypan avatar

Watchers

James Cloos avatar

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.