summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java
diff options
context:
space:
mode:
authorAndrej Shadura <andrewsh@debian.org>2019-03-09 22:30:29 +0000
committerAndrej Shadura <andrewsh@debian.org>2019-03-09 22:30:29 +0000
commit6160961591bfbfeab2ea5f7c249f58c78e893347 (patch)
treeae6898c52d4f697964996fb00e23e7f784ce1b47 /src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java
parentcde76aeb42240f7270bc6605c606ae07d2dc5a7d (diff)
Import Upstream version 0.4.0~beta2
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java58
1 files changed, 24 insertions, 34 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java b/src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java
index f70c7471..789a63e7 100644
--- a/src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java
+++ b/src/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/neighborhood/ExternalNeighborhood.java
@@ -1,26 +1,27 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier.spatial.neighborhood;
-/*
-This file is part of ELKI:
-Environment for Developing KDD-Applications Supported by Index-Structures
-
-Copyright (C) 2011
-Ludwig-Maximilians-Universität München
-Lehr- und Forschungseinheit für Datenbanksysteme
-ELKI Development Team
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2011
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
import java.io.BufferedReader;
import java.io.File;
@@ -45,8 +46,6 @@ 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.Relation;
import de.lmu.ifi.dbs.elki.logging.Logging;
-import de.lmu.ifi.dbs.elki.result.Result;
-import de.lmu.ifi.dbs.elki.result.ResultHierarchy;
import de.lmu.ifi.dbs.elki.utilities.FileUtil;
import de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer;
@@ -59,11 +58,11 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.FileParameter;
*
* @author Erich Schubert
*/
-public class ExternalNeighborhood extends AbstractPrecomputedNeighborhood implements Result {
+public class ExternalNeighborhood extends AbstractPrecomputedNeighborhood {
/**
* Logger
*/
- private static final Logging logger = Logging.getLogger(ExternalNeighborhood.class);
+ static final Logging logger = Logging.getLogger(ExternalNeighborhood.class);
/**
* Parameter to specify the neighborhood file
@@ -104,11 +103,6 @@ public class ExternalNeighborhood extends AbstractPrecomputedNeighborhood implem
*/
public static class Factory extends AbstractPrecomputedNeighborhood.Factory<Object> {
/**
- * Logger
- */
- private static final Logging logger = Logging.getLogger(ExternalNeighborhood.class);
-
- /**
* The input file.
*/
private File file;
@@ -127,10 +121,6 @@ public class ExternalNeighborhood extends AbstractPrecomputedNeighborhood implem
public NeighborSetPredicate instantiate(Relation<?> database) {
DataStore<DBIDs> store = loadNeighbors(database);
ExternalNeighborhood neighborhood = new ExternalNeighborhood(store);
- ResultHierarchy hier = database.getHierarchy();
- if(hier != null) {
- hier.add(database, neighborhood);
- }
return neighborhood;
}