diff options
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/application/jsmap')
4 files changed, 9 insertions, 8 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONBuffer.java b/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONBuffer.java index e1ecc2cb..b831d633 100644 --- a/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONBuffer.java +++ b/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONBuffer.java @@ -4,7 +4,7 @@ package de.lmu.ifi.dbs.elki.application.jsmap; This file is part of ELKI: Environment for Developing KDD-Applications Supported by Index-Structures - Copyright (C) 2013 + Copyright (C) 2014 Ludwig-Maximilians-Universität München Lehr- und Forschungseinheit für Datenbanksysteme ELKI Development Team diff --git a/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONResultHandler.java b/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONResultHandler.java index 16331b02..3ce22e2a 100644 --- a/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONResultHandler.java +++ b/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONResultHandler.java @@ -4,7 +4,7 @@ package de.lmu.ifi.dbs.elki.application.jsmap; This file is part of ELKI: Environment for Developing KDD-Applications Supported by Index-Structures - Copyright (C) 2013 + Copyright (C) 2014 Ludwig-Maximilians-Universität München Lehr- und Forschungseinheit für Datenbanksysteme ELKI Development Team diff --git a/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONWebServer.java b/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONWebServer.java index 6f8c8be7..4c861bef 100644 --- a/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONWebServer.java +++ b/src/de/lmu/ifi/dbs/elki/application/jsmap/JSONWebServer.java @@ -4,7 +4,7 @@ package de.lmu.ifi.dbs.elki.application.jsmap; This file is part of ELKI: Environment for Developing KDD-Applications Supported by Index-Structures - Copyright (C) 2013 + Copyright (C) 2014 Ludwig-Maximilians-Universität München Lehr- und Forschungseinheit für Datenbanksysteme ELKI Development Team @@ -44,6 +44,7 @@ import de.lmu.ifi.dbs.elki.database.ids.DBIDIter; import de.lmu.ifi.dbs.elki.database.ids.DBIDRef; import de.lmu.ifi.dbs.elki.database.ids.DBIDUtil; import de.lmu.ifi.dbs.elki.database.ids.DBIDs; +import de.lmu.ifi.dbs.elki.database.relation.DoubleRelation; import de.lmu.ifi.dbs.elki.database.relation.Relation; import de.lmu.ifi.dbs.elki.datasource.bundle.SingleObjectBundle; import de.lmu.ifi.dbs.elki.logging.Logging; @@ -147,7 +148,7 @@ public class JSONWebServer implements HttpHandler { // TODO: refactor to JSONFormatters! // Format a NumberVector if (data instanceof NumberVector) { - NumberVector<?> v = (NumberVector<?>) data; + NumberVector v = (NumberVector) data; re.appendKeyArray(bundle.meta(j)); for (int i = 0; i < v.getDimensionality(); i++) { re.append(v.doubleValue(i)); @@ -312,7 +313,7 @@ public class JSONWebServer implements HttpHandler { outlierMetaToJSON(re, meta); re.appendKeyArray("scores"); - Relation<Double> scores = or.getScores(); + DoubleRelation scores = or.getScores(); DBIDIter iter = or.getOrdering().iter(scores.getDBIDs()).iter(); for (int i = 0; i < offset && iter.valid(); i++) { iter.advance(); @@ -320,8 +321,8 @@ public class JSONWebServer implements HttpHandler { for (int i = 0; i < pagesize && iter.valid(); i++, iter.advance()) { re.startHash(); bundleToJSON(re, iter); - final Double val = scores.get(iter); - if (val != null) { + final double val = scores.doubleValue(iter); + if (!Double.isNaN(val)) { re.appendKeyValue("score", val); } re.closeHash(); diff --git a/src/de/lmu/ifi/dbs/elki/application/jsmap/package-info.java b/src/de/lmu/ifi/dbs/elki/application/jsmap/package-info.java index 458bbd93..c410b2a7 100644 --- a/src/de/lmu/ifi/dbs/elki/application/jsmap/package-info.java +++ b/src/de/lmu/ifi/dbs/elki/application/jsmap/package-info.java @@ -5,7 +5,7 @@ This file is part of ELKI: Environment for Developing KDD-Applications Supported by Index-Structures -Copyright (C) 2013 +Copyright (C) 2014 Ludwig-Maximilians-Universität München Lehr- und Forschungseinheit für Datenbanksysteme ELKI Development Team |