Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: all permutations of given lenght

by cataclismic_user (Novice)
on Aug 11, 2020 at 08:08 UTC ( [id://11120599]=note: print w/replies, xml ) Need Help??


in reply to Re: all permutations of given lenght
in thread all permutations of given lenght

Indeed! I am trying to generate an exhaustive list of SMILES codes, including their repetitions. I have tried
use strict; use warnings; use Algorithm::Combinatorics qw(permutations); my $strings = [qw(A B C)]; my $iter = permutations($strings, 3); while (my $c = $iter->next) { print "@$c\n"; }

The problem is that it does not generate things like AAA, BBB, CCC [A, B, C would be the corresponding SMILEs).

Replies are listed 'Best First'.
Re^3: all permutations of given lenght
by Anonymous Monk on Aug 11, 2020 at 10:50 UTC
    I am trying to generate an exhaustive list of SMILES codes, including their repetitions.
    permutations are reorderings, i.e. samples without replacement. You seem to want all possible samples with replacement, i.e. variations_with_repetition.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120599]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-24 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found