API for combinatorics
- ()
by Mark Engelberg
clojure-contrib is now deprecated
clojure-contrib is no longer being developed or maintained.
Rather than a single, monolithic, contributions library, Clojure now has
a set of separate libraries for each unit of functionality. The libraries
are in the Clojure GitHub organization at
https://github.com/clojure.
API documentation of the libraries can be found at
https://clojure.github.io.
If you're looking for a specific function or namespace from the old
clojure-contrib, see
"Where Did Clojure.Contrib Go".
Full namespace name:
clojure.contrib.combinatorics
Overview
Efficient, functional algorithms for generating lazy
sequences for common combinatorial functions. (See the source code
for a longer description.)
Public Variables and Functions
cartesian-product
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (cartesian-product & seqs)
All the ways to take one item from each sequence
Source
combinations
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (combinations items n)
All the unique ways of taking n different elements from items
Source
lex-permutations
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (lex-permutations c)
Fast lexicographic permutation generator for a sequence of numbers
Source
permutations
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (permutations items)
All the permutations of items, lexicographic by index
Source
selections
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (selections items n)
All the ways of taking n (possibly the same) elements from the sequence of items
Source
subsets
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (subsets items)
All the subsets of items
Source