Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated README to conform to new contrib standard

Signed-off-by: Christian Romney <cromney@pointslope.com>
Signed-off-by: Sean Corfield <sean@corfield.org>
  • Loading branch information...
commit 58dd34d7d583c8ddf4d4f668414eef0edb3028c5 1 parent 2cb06cf
Christian Romney authored September 17, 2012 seancorfield committed September 17, 2012

Showing 1 changed file with 95 additions and 20 deletions. Show diff stats Hide diff stats

  1. 115  README.md
115  README.md
Source Rendered
... ...
@@ -1,39 +1,114 @@
1  
-# clojure.math.combinatorics
  1
+clojure.math.combinatorics
  2
+========================================
2 3
 
3 4
 Formerly clojure.contrib.combinatorics.
4 5
 
5 6
 Efficient, functional algorithms for generating lazy
6 7
 sequences for common combinatorial functions. 
7 8
 
8  
-## Usage
  9
+Releases and Dependency Information
  10
+========================================
9 11
 
10  
-* (combinations items n) - A lazy sequence of all the unique
11  
-ways of taking n different elements from items.
  12
+Latest stable release: 0.0.3
12 13
 
13  
-     Example: (combinations [1 2 3] 2) -> ((1 2) (1 3) (2 3))
  14
+* [All Released Versions](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22math.combinatorics%22)
14 15
 
15  
-* (subsets items) - A lazy sequence of all the subsets of
16  
-items (but generalized to all sequences, not just sets).
  16
+* [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~math.combinatorics~~~)
17 17
 
18  
-      Example: (subsets [1 2 3]) -> (() (1) (2) (3) (1 2) (1 3) (2 3) (1 2 3))
  18
+[Leiningen](https://github.com/technomancy/leiningen) dependency information:
19 19
 
20  
-* (cartesian-product & seqs) - Takes any number of sequences
21  
-as arguments, and returns a lazy sequence of all the ways
22  
-to take one item from each seq.
  20
+```clojure
  21
+[org.clojure/math.combinatorics "0.0.3"]
  22
+```
23 23
 
24  
-      Example: (cartesian-product [1 2] [3 4]) -> ((1 3) (1 4) (2 3) (2 4))
  24
+[Maven](http://maven.apache.org/) dependency information:
25 25
 
26  
-* (selections items n) - A lazy sequence of all the ways to
27  
-take n (possibly the same) items from the sequence of items.
  26
+```xml
  27
+<dependency>
  28
+  <groupId>org.clojure</groupId>
  29
+  <artifactId>math.combinatorics</artifactId>
  30
+  <version>0.0.3</version>
  31
+</dependency>
  32
+```
28 33
 
29  
-     Example: (selections [1 2] 3) -> ((1 1 1) (1 1 2) (1 2 1) (1 2 2) (2 1 1) (2 1 2) (2 2 1) (2 2 2))
  34
+Example Usage
  35
+========================================
30 36
 
31  
-* (permutations items) - A lazy sequence of all the permutations
32  
-of items.
  37
+All functions return lazy sequences.
33 38
 
34  
-      Example: (permutations [1 2 3]) -> ((1 2 3) (1 3 2) (2 1 3) (2 3 1) (3 1 2) (3 2 1))
  39
+```clojure
  40
+(ns example.core
  41
+  (:require [clojure.math.combinatorics :as combo]))
  42
+  
  43
+; all the unique ways of taking n different elements from items
  44
+    
  45
+(combinations [1 2 3] 2)
  46
+  
  47
+;;=> ((1 2) (1 3) (2 3))
  48
+  
  49
+  
  50
+; all the subsets of items
35 51
 
  52
+(subsets [1 2 3]) 
36 53
 
37  
-## License
  54
+;;=> (() (1) (2) (3) (1 2) (1 3) (2 3) (1 2 3))  
  55
+  
38 56
 
39  
-Distributed under the Eclipse Public License, the same as Clojure.
  57
+; all the ways to take one item from each passed-in sequence
  58
+
  59
+(cartesian-product [1 2] [3 4]) 
  60
+
  61
+;;=> ((1 3) (1 4) (2 3) (2 4))
  62
+
  63
+
  64
+; all the ways to take n (possibly the same) items from the sequence of items
  65
+
  66
+(selections [1 2] 3) 
  67
+
  68
+;;=> ((1 1 1) (1 1 2) (1 2 1) (1 2 2) (2 1 1) (2 1 2) (2 2 1) (2 2 2))
  69
+  
  70
+
  71
+; all the permutations of items
  72
+
  73
+(permutations [1 2 3]) 
  74
+
  75
+;;=> ((1 2 3) (1 3 2) (2 1 3) (2 3 1) (3 1 2) (3 2 1))
  76
+  
  77
+```
  78
+ 
  79
+Refer to docstrings in the `clojure.math.combinatorics` namespace for
  80
+additional documentation.
  81
+
  82
+[API Documentation](http://clojure.github.com/math.combinatorics/)
  83
+
  84
+
  85
+Developer Information
  86
+========================================
  87
+
  88
+* [GitHub project](https://github.com/clojure/math.combinatorics)
  89
+
  90
+* [Bug Tracker](http://dev.clojure.org/jira/browse/MCOMB)
  91
+
  92
+* [Continuous Integration](http://build.clojure.org/job/math.combinatorics/)
  93
+
  94
+* [Compatibility Test Matrix](http://build.clojure.org/job/math.combinatorics-test-matrix/)
  95
+ 
  96
+
  97
+Changelog
  98
+========================================
  99
+
  100
+* Release 0.0.3 on 2012-07-06
  101
+	* Fixed bug with (selections [false] 3) returning nil
  102
+	* Fixed test syntax for Clojure 1.4.0/1.5.0
  103
+
  104
+* Release 0.0.2 on 2011-10-24
  105
+	* Deprecated lex-permutations (permutations is now intelligent)
  106
+
  107
+* Release 0.0.1 on 2011-09-29
  108
+	* Initial release.
  109
+	* Source-compatible with clojure.contrib.math, except for the name change.
  110
+
  111
+License
  112
+========================================
  113
+
  114
+Distributed under the Eclipse Public License, the same as Clojure.

0 notes on commit 58dd34d

Please sign in to comment.
Something went wrong with that request. Please try again.