diff --git a/mcq-cli/global b/mcq-cli/global
index db89f406..bb175948 100755
--- a/mcq-cli/global
+++ b/mcq-cli/global
@@ -1,2 +1,2 @@
#! /bin/bash
-exec java -cp $(dirname $0)/target/mcq-cli-1.4-SNAPSHOT-jar-with-dependencies.jar pl.poznan.put.mcq.cli.Global $@
+exec java -cp $(dirname $0)/target/mcq-cli-1.4.1-jar-with-dependencies.jar pl.poznan.put.mcq.cli.Global $@
diff --git a/mcq-cli/lcs b/mcq-cli/lcs
index 3415ac2c..b6bfac38 100755
--- a/mcq-cli/lcs
+++ b/mcq-cli/lcs
@@ -1,2 +1,2 @@
#! /bin/bash
-exec java -cp $(dirname $0)/target/mcq-cli-1.4-SNAPSHOT-jar-with-dependencies.jar pl.poznan.put.mcq.cli.Lcs $@
+exec java -cp $(dirname $0)/target/mcq-cli-1.4.1-jar-with-dependencies.jar pl.poznan.put.mcq.cli.Lcs $@
diff --git a/mcq-cli/local b/mcq-cli/local
index 866d5524..240a24cb 100755
--- a/mcq-cli/local
+++ b/mcq-cli/local
@@ -1,2 +1,2 @@
#! /bin/bash
-exec java -cp $(dirname $0)/target/mcq-cli-1.4-SNAPSHOT-jar-with-dependencies.jar pl.poznan.put.mcq.cli.Local $@
+exec java -cp $(dirname $0)/target/mcq-cli-1.4.1-jar-with-dependencies.jar pl.poznan.put.mcq.cli.Local $@
diff --git a/mcq-cli/pom.xml b/mcq-cli/pom.xml
index e4b08e97..f7fbfef5 100644
--- a/mcq-cli/pom.xml
+++ b/mcq-cli/pom.xml
@@ -5,7 +5,7 @@
mcq-parent
pl.poznan.put
- 1.4
+ 1.4.1
mcq-cli
diff --git a/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Global.java b/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Global.java
index c21a9aea..6e7613c5 100644
--- a/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Global.java
+++ b/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Global.java
@@ -68,7 +68,7 @@ private Global() {
private static final class Listener implements ParallelGlobalComparator.ProgressListener {
private final ProgressBar progressBar;
- public Listener(final ProgressBar progressBar) {
+ private Listener(final ProgressBar progressBar) {
super();
this.progressBar = progressBar;
}
@@ -80,20 +80,25 @@ public void setProgress(final int progress) {
@Override
public void complete(final GlobalMatrix matrix) {
- progressBar.close();
-
- final PrototypeBasedClusterer clusterer = new KMedoids();
- final double[][] rawMatrix = matrix.getDistanceMatrix().getMatrix();
- final ScoredClusteringResult clustering =
- KScanner.parallelScan(clusterer, rawMatrix, PAM.getInstance());
- final PartitionalClustering partitionalClustering =
- new PartitionalClustering(matrix.getDistanceMatrix(), clustering);
-
try {
+ progressBar.close();
+
final File directory = ExecHelper.createRandomDirectory();
Listener.exportResults(directory, matrix);
- Listener.exportDrawing(directory, partitionalClustering);
- Listener.exportClustering(directory, partitionalClustering);
+
+ final double[][] rawMatrix = matrix.getDistanceMatrix().getMatrix();
+
+ if (rawMatrix.length > 2) {
+ final PrototypeBasedClusterer clusterer = new KMedoids();
+ final ScoredClusteringResult clustering =
+ KScanner.parallelScan(clusterer, rawMatrix, PAM.getInstance());
+ final PartitionalClustering partitionalClustering =
+ new PartitionalClustering(matrix.getDistanceMatrix(), clustering);
+
+ Listener.exportDrawing(directory, partitionalClustering);
+ Listener.exportClustering(directory, partitionalClustering);
+ }
+
System.out.println("Results available in: " + directory);
} catch (final IOException e) {
System.err.println("Failed to store results");
diff --git a/mcq-clustering/pom.xml b/mcq-clustering/pom.xml
index f6e5b0c2..198c416d 100644
--- a/mcq-clustering/pom.xml
+++ b/mcq-clustering/pom.xml
@@ -4,7 +4,7 @@
mcq-parent
pl.poznan.put
- 1.4
+ 1.4.1
mcq-clustering
diff --git a/mcq-core/pom.xml b/mcq-core/pom.xml
index 244634a1..8905a0bb 100644
--- a/mcq-core/pom.xml
+++ b/mcq-core/pom.xml
@@ -5,7 +5,7 @@
mcq-parent
pl.poznan.put
- 1.4
+ 1.4.1
mcq-core
diff --git a/mcq-gui/pom.xml b/mcq-gui/pom.xml
index 78e5c461..3274fd28 100644
--- a/mcq-gui/pom.xml
+++ b/mcq-gui/pom.xml
@@ -5,7 +5,7 @@
mcq-parent
pl.poznan.put
- 1.4
+ 1.4.1
mcq-gui
diff --git a/pom.xml b/pom.xml
index c089e242..ded7be62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
pl.poznan.put
mcq-parent
- 1.4
+ 1.4.1
pom