commit - 5a71467dabbb387cc5bab04d8f48a4a641a00263
commit + 69afa2872b18017a5e0ada983534ad95701258d8
blob - 80dbbdbbeea6ae7e88e9e6ca7ca696bd15cade16
blob + 2bd92a23d5346b00f657a44b604fa5d5860e0554
--- README.md
+++ README.md
Let's imagine we have a program with three features and various values for each feature:
-- Sex: ♀️, ♂️
-- Weather: 🌧, ⛈, 🌩, ☀️, 🌤, 🌥
-- Mood: 😃, 😉, 😋, 😎, 🤐, 🤒, 😠, 😦, 😧, 😨, 😴, 😌
+- Sex (2): ♀️, ♂️
+- Weather (3): 🌧, ☀️, 🌥
+- Mood (3): 🤒, 😧, 😴
-
Jenny can generate combinations:
+```sh
+$ ./jenny -n3 2 3 3
+ 1a 2a 3a
+ 1b 2b 3b
+ 1b 2c 3c
+ 1a 2b 3c
+ 1b 2a 3c
+ 1a 2c 3b
+ 1b 2b 3a
+ 1b 2a 3b
+ 1a 2c 3a
+ 1a 2a 3b
+ 1a 2c 3c
+ 1b 2a 3a
+ 1a 2b 3b
+ 1b 2c 3a
+ 1a 2b 3a
+ 1b 2b 3c
+ 1a 2a 3c
+ 1b 2c 3b
```
-$ ./jenny -n3 2 6 12
- 1a 2d 3j
- 1b 2e 3i
- 1a 2a 3e
- ...
-
- 1a 2f 3i
- 1b 2a 3c
-```
-where 3 is a number of features in combination, 2, 6 and 12 are numbers of possible values for the appropriate feature. Total number of possible combinations is 144.
+where 3 is a number of features in combination, 2, 3 and 3 are numbers of
+possible values for the appropriate feature. Total number of possible
+unique combinations is 18.
-```
+```sh
$ cat jenny.sed
# number the testcases
=
# Dimension 2
s/ 2a / 🌧 /g
-s/ 2b / ⛈ /g
-s/ 2c / 🌩 /g
-s/ 2d / ☀️ /g
-s/ 2e / 🌤 /g
-s/ 2f / 🌥 /g
+s/ 2b / ☀️ /g
+s/ 2c / 🌥 /g
# Dimension 3
-s/ 3a / 😃 /g
-s/ 3b / 😉 /g
-s/ 3c / 😋 /g
-s/ 3d / 😎 /g
-s/ 3e / 🤐 /g
-s/ 3f / 🤒 /g
-s/ 3g / 😠 /g
-s/ 3h / 😦 /g
-s/ 3i / 😧 /g
-s/ 3j / 😨 /g
-s/ 3k / 😴 /g
-s/ 3l / 😌 /g
+s/ 3a / 🤒 /g
+s/ 3b / 😧 /g
+s/ 3c / 😴 /g
```
+```sh
+$ ./jenny -n3 2 3 3 | sed -f jenny.sed
+1 ♀️ 🌧 🤒
+2 ♂️ ☀️ 😧
+3 ♂️ 🌥 😴
+4 ♀️ ☀️ 😴
+5 ♂️ 🌧 😴
+6 ♀️ 🌥 😧
+7 ♂️ ☀️ 🤒
+8 ♂️ 🌧 😧
+9 ♀️ 🌥 🤒
+10 ♀️ 🌧 😧
+11 ♀️ 🌥 😴
+12 ♂️ 🌧 🤒
+13 ♀️ ☀️ 😧
+14 ♂️ 🌥 🤒
+15 ♀️ ☀️ 🤒
+16 ♂️ ☀️ 😴
+17 ♀️ 🌧 😴
+18 ♂️ 🌥 😧
```
-$ sed -f jenny.sed output.txt
-```
-
-
-```
- ♀️ ☀️ 😨
- ♂️ 🌤 😧
- ♀️ 🌧 🤐
- ♀️ ⛈ 😃
- ♀️ 🌩 😎
- ♂️ 🌥 😌
- ♂️ ⛈ 😉
- ♀️ 🌤 😋
- ♂️ 🌩 🤒
- ♀️ 🌥 😠
- ♀️ 🌩 😦
- ♀️ 🌤 😴
- ♂️ 🌧 😦
- ♂️ ☀️ 😴
- ♀️ 🌧 😌
- ♀️ ⛈ 😌
- ♂️ ☀️ 😌
- ♀️ 🌥 😴
- ♂️ 🌧 😨
- ♂️ ⛈ 😨
- ♀️ 🌩 😌
- ♀️ ☀️ 😧
- ♀️ 🌤 😌
- ♂️ 🌥 😧
- ♂️ 🌧 😧
- ♀️ ⛈ 😧
- ♀️ 🌩 😧
- ♂️ ☀️ 😦
- ♂️ 🌤 😦
- ♂️ 🌥 😦
- ♀️ 🌧 😴
- ♀️ ⛈ 😦
- ♂️ 🌩 😨
- ♂️ ☀️ 😠
- ♀️ 🌤 😠
- ♀️ 🌥 😨
- ♀️ 🌧 😠
- ♂️ ⛈ 😠
- ♂️ 🌩 😠
- ♀️ ☀️ 🤒
- ♂️ 🌤 🤒
- ♀️ 🌥 🤒
- ♂️ 🌧 😃
- ♀️ 🌧 😉
- ♂️ ⛈ 😋
- ♂️ ⛈ 😎
- ♂️ 🌩 🤐
- ♀️ ☀️ 🤐
- ♀️ 🌤 🤐
- ♀️ 🌥 🤐
- ♀️ 🌩 😴
- ♂️ ☀️ 😎
- ♂️ 🌤 😎
- ♀️ 🌥 😎
- ♀️ 🌥 😃
- ♀️ 🌥 😉
- ♀️ 🌥 😋
- ♀️ 🌧 🤒
- ♀️ ⛈ 🤒
- ♂️ 🌩 😋
- ♂️ ☀️ 😋
- ♀️ 🌤 😨
- ♂️ ☀️ 😃
- ♀️ ☀️ 😉
- ♀️ 🌧 😋
- ♀️ ⛈ 🤐
- ♂️ 🌩 😉
- ♂️ 🌤 😉
- ♂️ 🌩 😃
- ♀️ 🌧 😎
- ♀️ ⛈ 😴
- ♂️ 🌤 😃
- ♂️ 🌧 😉
- ♂️ 🌤 😌
- ♂️ 🌤 😴
- ♂️ 🌤 😨
- ♂️ 🌤 😠
- ♂️ 🌤 🤐
- ♂️ 🌥 😨
- ♂️ 🌤 😋
- ♀️ 🌧 😃
- ♂️ 🌥 😋
- ♀️ ☀️ 😌
- ♂️ 🌥 😃
- ♀️ ☀️ 😴
- ♂️ ☀️ 😨
- ♀️ ☀️ 😦
- ♂️ ☀️ 😧
- ♀️ ☀️ 😠
- ♂️ ☀️ 🤒
- ♀️ 🌥 😌
- ♂️ ☀️ 🤐
- ♀️ ☀️ 😎
- ♂️ 🌥 😴
- ♀️ ☀️ 😋
- ♂️ 🌥 🤒
- ♀️ 🌤 🤒
- ♂️ ☀️ 😉
- ♀️ ☀️ 😃
- ♂️ 🌥 🤐
- ♀️ 🌥 😦
- ♂️ 🌩 😌
- ♀️ 🌩 😨
- ♂️ 🌩 😴
- ♀️ 🌩 😠
- ♂️ 🌩 😧
- ♀️ 🌩 🤒
- ♂️ 🌩 😦
- ♀️ 🌩 🤐
- ♂️ 🌩 😎
- ♀️ 🌩 😋
- ♂️ 🌥 😠
- ♀️ 🌩 😉
- ♂️ 🌥 😎
- ♀️ 🌩 😃
- ♂️ 🌥 😉
- ♀️ 🌤 😃
- ♂️ ⛈ 😌
- ♀️ ⛈ 😨
- ♂️ ⛈ 😴
- ♀️ ⛈ 😠
- ♂️ ⛈ 😧
- ♀️ 🌤 😧
- ♂️ ⛈ 😦
- ♀️ 🌤 😎
- ♂️ ⛈ 🤒
- ♂️ 🌧 😴
- ♀️ ⛈ 😎
- ♂️ 🌧 😠
- ♀️ ⛈ 😋
- ♂️ 🌧 🤒
- ♀️ ⛈ 😉
- ♂️ 🌧 🤐
- ♀️ 🌧 😨
- ♀️ 🌧 😧
- ♂️ ⛈ 🤐
- ♀️ 🌧 😦
- ♂️ ⛈ 😃
- ♀️ 🌤 😦
- ♂️ 🌧 😌
- ♀️ 🌤 😉
- ♂️ 🌧 😎
- ♀️ 🌥 😧
- ♂️ 🌧 😋
-```