PetscDTEnumSubset#

Get an ordered subset of the integers [0, …, n - 1] from its encoding as an integers in [0, n choose k). The encoding is in lexicographic order.

Input Parameters#

  • n - a non-negative integer (see note about limits below)

  • k - an integer in [0, n]

  • j - an index in [0, n choose k)

Output Parameter#

  • subset - the jth subset of size k of the integers [0, …, n - 1]

Note#

Limited by arguments such that n choose k can be represented by PetscInt

See Also#

PetscDTSubsetIndex(), PetscDTFactorial(), PetscDTFactorialInt(), PetscDTBinomial(), PetscDTBinomialInt(), PetscDTEnumPerm(), PetscDTPermIndex()

Level#

beginner

Location#

include/petscdt.h


Index of all DT routines
Table of Contents for all manual pages
Index of all manual pages