Skip to content

Commit

Permalink
Merge branch 'hotfix/1.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
tzok committed Oct 25, 2018
2 parents 272dc3c + ddb6590 commit b4992d8
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion mcq-cli/global
Original file line number Diff line number Diff line change
@@ -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 $@
2 changes: 1 addition & 1 deletion mcq-cli/lcs
Original file line number Diff line number Diff line change
@@ -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 $@
2 changes: 1 addition & 1 deletion mcq-cli/local
Original file line number Diff line number Diff line change
@@ -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 $@
2 changes: 1 addition & 1 deletion mcq-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>mcq-parent</artifactId>
<groupId>pl.poznan.put</groupId>
<version>1.4</version>
<version>1.4.1</version>
</parent>

<artifactId>mcq-cli</artifactId>
Expand Down
29 changes: 17 additions & 12 deletions mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Global.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion mcq-clustering/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>mcq-parent</artifactId>
<groupId>pl.poznan.put</groupId>
<version>1.4</version>
<version>1.4.1</version>
</parent>

<artifactId>mcq-clustering</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion mcq-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>mcq-parent</artifactId>
<groupId>pl.poznan.put</groupId>
<version>1.4</version>
<version>1.4.1</version>
</parent>

<artifactId>mcq-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion mcq-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>mcq-parent</artifactId>
<groupId>pl.poznan.put</groupId>
<version>1.4</version>
<version>1.4.1</version>
</parent>

<artifactId>mcq-gui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>pl.poznan.put</groupId>
<artifactId>mcq-parent</artifactId>
<version>1.4</version>
<version>1.4.1</version>
<packaging>pom</packaging>

<modules>
Expand Down

0 comments on commit b4992d8

Please sign in to comment.