[ 
https://issues.apache.org/jira/browse/NUMBERS-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116228#comment-18116228
 ] 

Gilles Sadowski commented on NUMBERS-215:
-----------------------------------------

Branch "feature_NUMBERS-215" created.  Review welcome.


> Stirling partitions generator
> -----------------------------
>
>                 Key: NUMBERS-215
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-215
>             Project: Commons Numbers
>          Issue Type: New Feature
>          Components: combinatorics
>            Reporter: Gilles Sadowski
>            Assignee: Gilles Sadowski
>            Priority: Minor
>             Fix For: 1.4
>
>
> Would it be useful to provide functionality to *iterate* over the partitions 
> defined by "Stirling number of the second kind" (i.e. all partitions into K 
> subsets, of a set of N elements)?
> Code would be in a nested static class of the existing 
> [{{Stirling}}|https://commons.apache.org/proper/commons-numbers/commons-numbers-combinatorics/apidocs/src-html/org/apache/commons/numbers/combinatorics/Stirling.html]
>  class:
> {code}
> public final class Stirling {
>     // ...
>     public static final class S2 implements Iterable<List<List<Integer>> {
>          // ...
>          public static S2 of(int n, int k) {
>              // ...
>          }
>     }
> }
> {code}
> I have a potential use case (for very small "N").



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to