[top][index]
search for:

subsets(Set,ZZ) -- produce all the subsets

Synopsis:

  • Function: subsets -- produce all the subsets
  • Input:
  • an instance of class Set.
  • an instance of class ZZ.
  • subsets(s,j) -- yields a list of those subsets of the list or set s which have j elements.

    i1 : subsets(set {a,b,c},2)

    o1 = {Set {a, b}, Set {a, c}, Set {b, c}}

    o1 : List

    See also:

  • subsets -- produce all the subsets
  • Code:

         -- ../../../Macaulay2/m2/combinatorics.m2:16
         subsets(Set,ZZ) := (s,j) -> apply(subsets(toList s, j), set)

    [top][index]
    search for: