summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/de/lmu/ifi/dbs/elki/AllTests.java25
-rw-r--r--test/de/lmu/ifi/dbs/elki/JUnit4Test.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java29
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java25
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCANResults.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDeLiCluResults.java25
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestEMResults.java26
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestKMeansResults.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestOPTICSResults.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSLINKResults.java25
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java26
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java31
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java29
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java29
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java29
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java27
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java27
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java27
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java26
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java27
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestABOD.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuEvolutionary.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuNaive.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierDetection.java33
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierScore.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestINFLO.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNOutlier.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNWeightOutlier.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLDOF.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOCI.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOF.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLoOP.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOnlineLOF.java25
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestReferenceBasedOutlierDetection.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestSOD.java26
-rw-r--r--test/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/data/spatial/TestPolygon.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/evaluation/TestComputeROC.java31
-rw-r--r--test/de/lmu/ifi/dbs/elki/evaluation/TestPairCountingFMeasure.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/index/TestIndexStructures.java40
-rw-r--r--test/de/lmu/ifi/dbs/elki/index/preprocessed/TestMaterializedKNNAndRKNNPreprocessor.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/logging/TestOutputStreamLogger.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestAffineTransformation.java40
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestFlexiHistogram.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestKernelDensityFitting.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestLevenbergMarquardtGaussianFitting.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestMatrix.java25
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestQuickSelect.java24
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestReplacingHistogram.java30
-rw-r--r--test/de/lmu/ifi/dbs/elki/math/TestWeightFunctions.java62
-rw-r--r--test/de/lmu/ifi/dbs/elki/persistent/TestByteArrayUtil.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskArray.java23
-rw-r--r--test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskUpperTriangleMatrix.java45
-rw-r--r--test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestHeap.java27
-rw-r--r--test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTiedTopBoundedHeap.java30
-rw-r--r--test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTopBoundedHeap.java27
-rw-r--r--test/de/lmu/ifi/dbs/elki/visualization/TestLinearScale.java35
61 files changed, 1514 insertions, 109 deletions
diff --git a/test/de/lmu/ifi/dbs/elki/AllTests.java b/test/de/lmu/ifi/dbs/elki/AllTests.java
index 388ad193..cc0e1af6 100644
--- a/test/de/lmu/ifi/dbs/elki/AllTests.java
+++ b/test/de/lmu/ifi/dbs/elki/AllTests.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki;
+/*
+ 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.util.List;
import junit.framework.JUnit4TestAdapter;
@@ -24,7 +47,7 @@ public class AllTests extends TestSuite {
List<Class<?>> tests = InspectionUtil.findAllImplementations(TestCase.class, false);
tests.addAll(InspectionUtil.findAllImplementations(JUnit4Test.class, false));
for(Class<?> cls : tests) {
- if (cls == AllTests.class) {
+ if(cls == AllTests.class) {
continue;
}
Test test = new JUnit4TestAdapter(cls);
diff --git a/test/de/lmu/ifi/dbs/elki/JUnit4Test.java b/test/de/lmu/ifi/dbs/elki/JUnit4Test.java
index 0a8126ba..023d0905 100644
--- a/test/de/lmu/ifi/dbs/elki/JUnit4Test.java
+++ b/test/de/lmu/ifi/dbs/elki/JUnit4Test.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki;
+/*
+ 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 org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java b/test/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java
index f17f9ebf..894a314f 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm;
+/*
+ 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 static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -76,11 +99,11 @@ public abstract class AbstractSimpleAlgorithmTest {
protected <T> Database makeSimpleDatabase(String filename, int expectedSize, ListParameterization params, Class<?>[] filters) {
org.junit.Assert.assertTrue("Test data set not found: " + filename, (new File(filename)).exists());
params.addParameter(FileBasedDatabaseConnection.INPUT_ID, filename);
-
+
List<Class<?>> filterlist = new ArrayList<Class<?>>();
filterlist.add(FixedDBIDsFilter.class);
- if (filters != null) {
- for (Class<?> filter : filters) {
+ if(filters != null) {
+ for(Class<?> filter : filters) {
filterlist.add(filter);
}
}
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java b/test/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java
index c2d7f650..fa5dbc14 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm;
+/*
+ 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.util.Arrays;
import java.util.List;
@@ -99,7 +122,7 @@ public class TestKNNJoin implements JUnit4Test {
org.junit.Assert.assertEquals("Manhattan variance 2NN", var2nnManhattan, meansize.getSampleVariance(), 0.00001);
}
}
-
+
/**
* Test {@link RStarTree} using a file based database connection.
*
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCANResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCANResults.java
index e953024e..025a6f4f 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCANResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCANResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDeLiCluResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDeLiCluResults.java
index 0c02f6e2..9fc898f6 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDeLiCluResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDeLiCluResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -36,7 +59,7 @@ public class TestDeLiCluResults extends AbstractSimpleAlgorithmTest implements J
indexparams.addParameter(StaticArrayDatabase.INDEX_ID, DeLiCluTreeFactory.class);
indexparams.addParameter(DeLiCluTreeFactory.PAGE_SIZE_ID, 1000);
Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710, indexparams, null);
-
+
// Setup actual algorithm
ListParameterization params = new ListParameterization();
params.addParameter(DeLiClu.MINPTS_ID, 18);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestEMResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestEMResults.java
index e3e4c984..16edcf94 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestEMResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestEMResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -23,8 +46,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*/
public class TestEMResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
- * Run EM with fixed parameters and compare the result to a golden
- * standard.
+ * Run EM with fixed parameters and compare the result to a golden standard.
*
* @throws ParameterException
*/
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestKMeansResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestKMeansResults.java
index 78cf3138..d4557e8f 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestKMeansResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestKMeansResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestOPTICSResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestOPTICSResults.java
index b9bd1067..d91c1060 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestOPTICSResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestOPTICSResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSLINKResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSLINKResults.java
index b7374942..b1a89360 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSLINKResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSLINKResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -24,7 +47,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*/
public class TestSLINKResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
// TODO: add a test for a non-single-link dataset?
-
+
/**
* Run SLINK with fixed parameters and compare the result to a golden
* standard.
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java
index 1c54e5ec..43ae1a60 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -8,7 +31,6 @@ import de.lmu.ifi.dbs.elki.data.Clustering;
import de.lmu.ifi.dbs.elki.data.DoubleVector;
import de.lmu.ifi.dbs.elki.data.model.Model;
import de.lmu.ifi.dbs.elki.database.Database;
-import de.lmu.ifi.dbs.elki.distance.distancevalue.DoubleDistance;
import de.lmu.ifi.dbs.elki.index.preprocessed.snn.SharedNearestNeighborPreprocessor;
import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
@@ -39,7 +61,7 @@ public class TestSNNClusteringResults extends AbstractSimpleAlgorithmTest implem
params.addParameter(SNNClustering.EPSILON_ID, 77);
params.addParameter(SNNClustering.MINPTS_ID, 28);
params.addParameter(SharedNearestNeighborPreprocessor.Factory.NUMBER_OF_NEIGHBORS_ID, 100);
- SNNClustering<DoubleVector, DoubleDistance> snn = ClassGenericsUtil.parameterizeOrAbort(SNNClustering.class, params);
+ SNNClustering<DoubleVector> snn = ClassGenericsUtil.parameterizeOrAbort(SNNClustering.class, params);
testParameterizationOk(params);
// run SNN on database
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java
index fc099a91..33ba56c5 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.correlation;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -35,7 +58,7 @@ public class TestCASHResults extends AbstractSimpleAlgorithmTest implements JUni
inp.addParameter(FileBasedDatabaseConnection.PARSER_ID, ParameterizationFunctionLabelParser.class);
// Input
Database db = makeSimpleDatabase(UNITTEST + "hierarchical-3d2d1d.csv", 600, inp, null);
-
+
// CASH parameters
ListParameterization params = new ListParameterization();
params.addParameter(CASH.JITTER_ID, 0.7);
@@ -68,17 +91,17 @@ public class TestCASHResults extends AbstractSimpleAlgorithmTest implements JUni
ListParameterization inp = new ListParameterization();
inp.addParameter(FileBasedDatabaseConnection.PARSER_ID, ParameterizationFunctionLabelParser.class);
Database db = makeSimpleDatabase(UNITTEST + "correlation-embedded-2-4d.ascii", 600, inp, null);
-
+
// CASH parameters
ListParameterization params = new ListParameterization();
params.addParameter(CASH.JITTER_ID, 0.7);
params.addParameter(CASH.MINPTS_ID, 160);
params.addParameter(CASH.MAXLEVEL_ID, 40);
-
+
// setup algorithm
CASH cash = ClassGenericsUtil.parameterizeOrAbort(CASH.class, params);
testParameterizationOk(params);
-
+
// run CASH on database
Clustering<Model> result = cash.run(db);
testFMeasure(db, result, 0.443246);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java
index cc265c90..2fbe8401 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.correlation;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -67,7 +90,7 @@ public class TestCOPACResults extends AbstractSimpleAlgorithmTest implements JUn
@Test
public void testCOPACOverlap() {
Database db = makeSimpleDatabase(UNITTEST + "correlation-overlap-3-5d.ascii", 650);
-
+
// Setup algorithm
ListParameterization params = new ListParameterization();
params.addParameter(COPAC.PARTITION_ALGORITHM_ID, DBSCAN.class);
@@ -80,10 +103,10 @@ public class TestCOPACResults extends AbstractSimpleAlgorithmTest implements JUn
params.addParameter(WeightedCovarianceMatrixBuilder.WEIGHT_ID, ErfcWeight.class);
params.addParameter(PCAFilteredRunner.PCA_EIGENPAIR_FILTER, PercentageEigenPairFilter.class);
params.addParameter(PercentageEigenPairFilter.ALPHA_ID, 0.8);
-
+
COPAC<DoubleVector, DoubleDistance> copac = ClassGenericsUtil.parameterizeOrAbort(COPAC.class, params);
testParameterizationOk(params);
-
+
Clustering<Model> result = copac.run(db);
testFMeasure(db, result, 0.84687864);
testClusterSizes(result, new int[] { 1, 22, 22, 29, 34, 158, 182, 202 });
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java
index 06f3c723..ec030ec1 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.correlation;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -76,7 +99,7 @@ public class TestERiCResults extends AbstractSimpleAlgorithmTest implements JUni
@Test
public void testERiCOverlap() {
Database db = makeSimpleDatabase(UNITTEST + "correlation-overlap-3-5d.ascii", 650);
-
+
// Setup algorithm
ListParameterization params = new ListParameterization();
// ERiC
@@ -95,10 +118,10 @@ public class TestERiCResults extends AbstractSimpleAlgorithmTest implements JUni
params.addParameter(WeightedCovarianceMatrixBuilder.WEIGHT_ID, ErfcWeight.class);
params.addParameter(PCAFilteredRunner.PCA_EIGENPAIR_FILTER, PercentageEigenPairFilter.class);
params.addParameter(PercentageEigenPairFilter.ALPHA_ID, 0.6);
-
+
ERiC<DoubleVector> eric = ClassGenericsUtil.parameterizeOrAbort(ERiC.class, params);
testParameterizationOk(params);
-
+
// run ERiC on database
Clustering<CorrelationModel<DoubleVector>> result = eric.run(db);
testFMeasure(db, result, 0.831136946);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java
index a0c97d6e..bfbddd64 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.correlation;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -56,17 +79,17 @@ public class TestFourCResults extends AbstractSimpleAlgorithmTest implements JUn
@Test
public void testFourCOverlap() {
Database db = makeSimpleDatabase(UNITTEST + "correlation-overlap-3-5d.ascii", 650);
-
+
// Setup algorithm
ListParameterization params = new ListParameterization();
// 4C
params.addParameter(AbstractProjectedDBSCAN.EPSILON_ID, 1.2);
params.addParameter(AbstractProjectedDBSCAN.MINPTS_ID, 5);
params.addParameter(AbstractProjectedDBSCAN.LAMBDA_ID, 3);
-
+
FourC<DoubleVector> fourc = ClassGenericsUtil.parameterizeOrAbort(FourC.class, params);
testParameterizationOk(params);
-
+
// run 4C on database
Clustering<Model> result = fourc.run(db);
testFMeasure(db, result, 0.48305405);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java
index 33c29371..48b84d04 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.correlation;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java
index d3d8cdbe..d2cacf1b 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.subspace;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -64,14 +87,14 @@ public class TestCLIQUEResults extends AbstractSimpleAlgorithmTest implements JU
@Test
public void testCLIQUESubspaceOverlapping() {
Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-3-4d.ascii", 850);
-
+
// Setup algorithm
ListParameterization params = new ListParameterization();
params.addParameter(CLIQUE.TAU_ID, 0.2);
params.addParameter(CLIQUE.XSI_ID, 6);
CLIQUE<DoubleVector> clique = ClassGenericsUtil.parameterizeOrAbort(CLIQUE.class, params);
testParameterizationOk(params);
-
+
// run CLIQUE on database
Clustering<SubspaceModel<DoubleVector>> result = clique.run(db);
testFMeasure(db, result, 0.433661);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java
index 2cb08fd7..ca8f55b4 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.subspace;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -55,14 +78,14 @@ public class TestDiSHResults extends AbstractSimpleAlgorithmTest implements JUni
@Test
public void testDiSHSubspaceOverlapping() {
Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-4-5d.ascii", 1100);
-
+
// Setup algorithm
ListParameterization params = new ListParameterization();
params.addParameter(DiSH.EPSILON_ID, 0.1);
params.addParameter(DiSH.MU_ID, 30);
DiSH<DoubleVector> dish = ClassGenericsUtil.parameterizeOrAbort(DiSH.class, params);
testParameterizationOk(params);
-
+
// run DiSH on database
Clustering<SubspaceModel<DoubleVector>> result = dish.run(db);
testFMeasure(db, result, 0.6376870);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java
index 66e7ed0b..48dbe9c3 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.subspace;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -58,7 +81,7 @@ public class TestPROCLUSResults extends AbstractSimpleAlgorithmTest implements J
@Test
public void testPROCLUSSubspaceOverlapping() {
Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-3-4d.ascii", 850);
-
+
// Setup algorithm
ListParameterization params = new ListParameterization();
params.addParameter(PROCLUS.L_ID, 2);
@@ -66,7 +89,7 @@ public class TestPROCLUSResults extends AbstractSimpleAlgorithmTest implements J
params.addParameter(PROCLUS.SEED_ID, 2);
PROCLUS<DoubleVector> proclus = ClassGenericsUtil.parameterizeOrAbort(PROCLUS.class, params);
testParameterizationOk(params);
-
+
// run PROCLUS on database
Clustering<Model> result = proclus.run(db);
testFMeasure(db, result, 0.9673718);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java
index 25704194..9e04d6d3 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.subspace;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -37,7 +60,8 @@ public class TestPreDeConResults extends AbstractSimpleAlgorithmTest implements
ListParameterization inp = new ListParameterization();
inp.addParameter(ClassLabelFilter.CLASS_LABEL_INDEX_ID, 1);
Class<?>[] filters = new Class<?>[] { ClassLabelFilter.class };
- // FIXME: makeSimpleDatabase currently does also add FILTERS, this doesn't work.
+ // FIXME: makeSimpleDatabase currently does also add FILTERS, this doesn't
+ // work.
Database db = makeSimpleDatabase(UNITTEST + "axis-parallel-subspace-clusters-6d.csv.gz", 2500, inp, filters);
ListParameterization params = new ListParameterization();
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java
index 65756bbc..9f0e1550 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering.subspace;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -57,14 +80,14 @@ public class TestSUBCLUResults extends AbstractSimpleAlgorithmTest implements JU
@Test
public void testSUBCLUSubspaceOverlapping() {
Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-3-4d.ascii", 850);
-
+
// Setup algorithm
ListParameterization params = new ListParameterization();
params.addParameter(SUBCLU.EPSILON_ID, 0.04);
params.addParameter(SUBCLU.MINPTS_ID, 70);
SUBCLU<DoubleVector> subclu = ClassGenericsUtil.parameterizeOrAbort(SUBCLU.class, params);
testParameterizationOk(params);
-
+
// run SUBCLU on database
Clustering<SubspaceModel<DoubleVector>> result = subclu.run(db);
testFMeasure(db, result, 0.49279033);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestABOD.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestABOD.java
index 4a4a635c..022c448c 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestABOD.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestABOD.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuEvolutionary.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuEvolutionary.java
index e5eb09d5..c2f8c016 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuEvolutionary.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuEvolutionary.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuNaive.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuNaive.java
index cf396f35..92c74f3c 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuNaive.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestAggarwalYuNaive.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierDetection.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierDetection.java
index 5fb9c983..79c596ff 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierDetection.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierDetection.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
@@ -12,11 +35,11 @@ import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
/**
- * Tests the DBOutlierDetection algorithm.
+ * Tests the DBOutlierDetection algorithm.
*
* @author Lucia Cichella
*/
-public class TestDBOutlierDetection extends AbstractSimpleAlgorithmTest implements JUnit4Test{
+public class TestDBOutlierDetection extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testDBOutlierDetection() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-fire.ascii", 1025);
@@ -26,14 +49,14 @@ public class TestDBOutlierDetection extends AbstractSimpleAlgorithmTest implemen
params.addParameter(DBOutlierDetection.D_ID, 0.175);
params.addParameter(DBOutlierDetection.P_ID, 0.98);
- //setup Algorithm
+ // setup Algorithm
DBOutlierDetection<DoubleVector, DoubleDistance> dbOutlierDetection = ClassGenericsUtil.parameterizeOrAbort(DBOutlierDetection.class, params);
testParameterizationOk(params);
- //run DBOutlierDetection on database
+ // run DBOutlierDetection on database
OutlierResult result = dbOutlierDetection.run(db);
testSingleScore(result, 1025, 0.0);
- testAUC(db, "Noise", result, 0.97487179);
+ testAUC(db, "Noise", result, 0.97487179);
}
} \ No newline at end of file
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierScore.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierScore.java
index 6f76efe2..875eceb3 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierScore.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestDBOutlierScore.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java
index 96107e8a..52c20bbe 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java
index a59c7810..e0c54380 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestINFLO.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestINFLO.java
index 25092ad5..2323e512 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestINFLO.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestINFLO.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNOutlier.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNOutlier.java
index c5ba91b7..a6708171 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNOutlier.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNOutlier.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNWeightOutlier.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNWeightOutlier.java
index e84db06c..be5e2704 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNWeightOutlier.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestKNNWeightOutlier.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLDOF.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLDOF.java
index cdcbd94b..210a9e71 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLDOF.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLDOF.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOCI.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOCI.java
index f4e95736..3d2cd32e 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOCI.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOCI.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOF.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOF.java
index b7586344..e4d71111 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOF.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLOF.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLoOP.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLoOP.java
index 0aa10999..18d759c5 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLoOP.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestLoOP.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java
index 218e52a8..be6779ff 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOnlineLOF.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOnlineLOF.java
index 21e3d12c..4c875917 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOnlineLOF.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOnlineLOF.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -98,7 +121,7 @@ public class TestOnlineLOF implements JUnit4Test {
// setup algorithm
OnlineLOF<DoubleVector, DoubleDistance> lof = new OnlineLOF<DoubleVector, DoubleDistance>(k, neighborhoodDistanceFunction, reachabilityDistanceFunction);
-
+
// run OnlineLOF on database
OutlierResult result = lof.run(db);
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestReferenceBasedOutlierDetection.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestReferenceBasedOutlierDetection.java
index a8f17231..901f5a3e 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestReferenceBasedOutlierDetection.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestReferenceBasedOutlierDetection.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestSOD.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestSOD.java
index d26ab55a..cab95aff 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestSOD.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/TestSOD.java
@@ -1,12 +1,34 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
import de.lmu.ifi.dbs.elki.data.DoubleVector;
import de.lmu.ifi.dbs.elki.database.Database;
-import de.lmu.ifi.dbs.elki.distance.distancevalue.DoubleDistance;
import de.lmu.ifi.dbs.elki.index.preprocessed.snn.SharedNearestNeighborPreprocessor;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
@@ -28,7 +50,7 @@ public class TestSOD extends AbstractSimpleAlgorithmTest implements JUnit4Test {
params.addParameter(SharedNearestNeighborPreprocessor.Factory.NUMBER_OF_NEIGHBORS_ID, 19);
// setup Algorithm
- SOD<DoubleVector, DoubleDistance> sod = ClassGenericsUtil.parameterizeOrAbort(SOD.class, params);
+ SOD<DoubleVector> sod = ClassGenericsUtil.parameterizeOrAbort(SOD.class, params);
testParameterizationOk(params);
// run SOD on database
diff --git a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java
index 68d68f62..0c568578 100644
--- a/test/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java
+++ b/test/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.algorithm.outlier.meta;
+/*
+ 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 org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
diff --git a/test/de/lmu/ifi/dbs/elki/data/spatial/TestPolygon.java b/test/de/lmu/ifi/dbs/elki/data/spatial/TestPolygon.java
index 385461e7..1294c91a 100644
--- a/test/de/lmu/ifi/dbs/elki/data/spatial/TestPolygon.java
+++ b/test/de/lmu/ifi/dbs/elki/data/spatial/TestPolygon.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.data.spatial;
+/*
+ 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 static org.junit.Assert.*;
import java.util.ArrayList;
diff --git a/test/de/lmu/ifi/dbs/elki/evaluation/TestComputeROC.java b/test/de/lmu/ifi/dbs/elki/evaluation/TestComputeROC.java
index 46adb1bb..2ad7c11f 100644
--- a/test/de/lmu/ifi/dbs/elki/evaluation/TestComputeROC.java
+++ b/test/de/lmu/ifi/dbs/elki/evaluation/TestComputeROC.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.evaluation;
+/*
+ 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.util.ArrayList;
import java.util.List;
@@ -19,7 +42,7 @@ import de.lmu.ifi.dbs.elki.utilities.pairs.Pair;
* Test to validate ROC curve computation.
*
* @author Erich Schubert
- *
+ *
*/
public class TestComputeROC implements JUnit4Test {
/**
@@ -33,7 +56,7 @@ public class TestComputeROC implements JUnit4Test {
positive.add(DBIDUtil.importInteger(3));
positive.add(DBIDUtil.importInteger(4));
positive.add(DBIDUtil.importInteger(5));
-
+
ArrayList<Pair<Double, DBID>> distances = new ArrayList<Pair<Double, DBID>>();
distances.add(new Pair<Double, DBID>(0.0, DBIDUtil.importInteger(1)));
distances.add(new Pair<Double, DBID>(1.0, DBIDUtil.importInteger(2)));
@@ -44,11 +67,11 @@ public class TestComputeROC implements JUnit4Test {
distances.add(new Pair<Double, DBID>(4.0, DBIDUtil.importInteger(4)));
distances.add(new Pair<Double, DBID>(5.0, DBIDUtil.importInteger(9)));
distances.add(new Pair<Double, DBID>(6.0, DBIDUtil.importInteger(5)));
-
+
List<DoubleDoublePair> roccurve = ROC.materializeROC(9, positive, distances.iterator());
// System.out.println(roccurve);
Assert.assertEquals("ROC curve too complex", 6, roccurve.size());
-
+
double auc = ROC.computeAUC(roccurve);
Assert.assertEquals("ROC AUC not right.", 0.6, auc, 0.0001);
}
diff --git a/test/de/lmu/ifi/dbs/elki/evaluation/TestPairCountingFMeasure.java b/test/de/lmu/ifi/dbs/elki/evaluation/TestPairCountingFMeasure.java
index 4944db3d..123e2e4f 100644
--- a/test/de/lmu/ifi/dbs/elki/evaluation/TestPairCountingFMeasure.java
+++ b/test/de/lmu/ifi/dbs/elki/evaluation/TestPairCountingFMeasure.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.evaluation;
+/*
+ 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 static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
diff --git a/test/de/lmu/ifi/dbs/elki/index/TestIndexStructures.java b/test/de/lmu/ifi/dbs/elki/index/TestIndexStructures.java
index 8d30bea4..53801e09 100644
--- a/test/de/lmu/ifi/dbs/elki/index/TestIndexStructures.java
+++ b/test/de/lmu/ifi/dbs/elki/index/TestIndexStructures.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.index;
+/*
+ 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 static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
@@ -128,13 +151,16 @@ public class TestIndexStructures implements JUnit4Test {
*
* @throws ParameterException
*/
-// @Test
-// public void testXTree() {
-// ListParameterization xtreeparams = new ListParameterization();
-// xtreeparams.addParameter(StaticArrayDatabase.INDEX_ID, experimentalcode.shared.index.xtree.XTreeFactory.class);
-// xtreeparams.addParameter(TreeIndexFactory.PAGE_SIZE_ID, 300);
-// testFileBasedDatabaseConnection(xtreeparams, DoubleDistanceRStarTreeKNNQuery.class, DoubleDistanceRStarTreeRangeQuery.class);
-// }
+ // @Test
+ // public void testXTree() {
+ // ListParameterization xtreeparams = new ListParameterization();
+ // xtreeparams.addParameter(StaticArrayDatabase.INDEX_ID,
+ // experimentalcode.shared.index.xtree.XTreeFactory.class);
+ // xtreeparams.addParameter(TreeIndexFactory.PAGE_SIZE_ID, 300);
+ // testFileBasedDatabaseConnection(xtreeparams,
+ // DoubleDistanceRStarTreeKNNQuery.class,
+ // DoubleDistanceRStarTreeRangeQuery.class);
+ // }
/**
* Actual test routine.
diff --git a/test/de/lmu/ifi/dbs/elki/index/preprocessed/TestMaterializedKNNAndRKNNPreprocessor.java b/test/de/lmu/ifi/dbs/elki/index/preprocessed/TestMaterializedKNNAndRKNNPreprocessor.java
index 2d95074a..e3948fef 100644
--- a/test/de/lmu/ifi/dbs/elki/index/preprocessed/TestMaterializedKNNAndRKNNPreprocessor.java
+++ b/test/de/lmu/ifi/dbs/elki/index/preprocessed/TestMaterializedKNNAndRKNNPreprocessor.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.index.preprocessed;
+/*
+ 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 static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
diff --git a/test/de/lmu/ifi/dbs/elki/logging/TestOutputStreamLogger.java b/test/de/lmu/ifi/dbs/elki/logging/TestOutputStreamLogger.java
index 97e77867..7d0a9317 100644
--- a/test/de/lmu/ifi/dbs/elki/logging/TestOutputStreamLogger.java
+++ b/test/de/lmu/ifi/dbs/elki/logging/TestOutputStreamLogger.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.logging;
+/*
+ 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 static org.junit.Assert.assertEquals;
import java.io.ByteArrayOutputStream;
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestAffineTransformation.java b/test/de/lmu/ifi/dbs/elki/math/TestAffineTransformation.java
index c5616e8d..0ac6b1a6 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestAffineTransformation.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestAffineTransformation.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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 static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
@@ -87,19 +110,19 @@ public class TestAffineTransformation implements JUnit4Test {
assertEquals("Vector wasn't translated properly backwards.", v1, v2b);
Vector v1b = t.applyInverse(v1t);
assertEquals("Vector wasn't translated properly back and forward.", v1, v1b);
-
+
// Translation
Vector vd = v1.minus(v2b);
Vector vtd = v1t.minus(v2t);
assertEquals("Translation changed vector difference.", vd, vtd);
-
+
// Translation shouldn't change relative vectors.
assertEquals("Relative vectors weren't left unchanged by translation!", v1, t.applyRelative(v1));
assertEquals("Relative vectors weren't left unchanged by translation!", v2t, t.applyRelative(v2t));
assertEquals("Relative vectors weren't left unchanged by translation!", v1t, t.applyRelative(v1t));
assertEquals("Relative vectors weren't left unchanged by translation!", v2b, t.applyRelative(v2b));
}
-
+
/**
* Test direct inclusion of matrices
*/
@@ -154,7 +177,7 @@ public class TestAffineTransformation implements JUnit4Test {
assertTrue("Forward-Backward didn't work correctly.", v1.minus(v3).euclideanLength() < 0.0001);
Vector v4 = t.apply(t.apply(t.apply(v1)));
assertTrue("Triple-Rotation by 120 degree didn't work", v1.minus(v4).euclideanLength() < 0.0001);
-
+
// Rotation shouldn't disagree for relative vectors.
// (they just are not affected by translation!)
assertEquals("Relative vectors were affected differently by pure rotation!", v2, t.applyRelative(v1));
@@ -180,13 +203,12 @@ public class TestAffineTransformation implements JUnit4Test {
Vector p5 = new Vector(new double[] { 7, 3, 5 });
Vector p6 = new Vector(new double[] { 7, 5, 3 });
Vector[] ps = new Vector[] {
- // with no arguments.
+ // with no arguments.
p1,
- // with just one argument.
+ // with just one argument.
p1, p3, p5,
- // with two arguments.
- p1, p2, p3, p4, p5, p6,
- };
+ // with two arguments.
+ p1, p2, p3, p4, p5, p6, };
// index in reference array
int idx = 0;
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestFlexiHistogram.java b/test/de/lmu/ifi/dbs/elki/math/TestFlexiHistogram.java
index 3ce38f8b..b3db5b85 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestFlexiHistogram.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestFlexiHistogram.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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 static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestKernelDensityFitting.java b/test/de/lmu/ifi/dbs/elki/math/TestKernelDensityFitting.java
index cc0a1f5c..7533a235 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestKernelDensityFitting.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestKernelDensityFitting.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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 static org.junit.Assert.assertEquals;
import java.util.Arrays;
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestLevenbergMarquardtGaussianFitting.java b/test/de/lmu/ifi/dbs/elki/math/TestLevenbergMarquardtGaussianFitting.java
index 49c84996..46676c9b 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestLevenbergMarquardtGaussianFitting.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestLevenbergMarquardtGaussianFitting.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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 static org.junit.Assert.assertEquals;
import org.junit.Test;
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestMatrix.java b/test/de/lmu/ifi/dbs/elki/math/TestMatrix.java
index 49042ceb..0d22d19a 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestMatrix.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestMatrix.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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.util.Random;
import org.junit.Test;
@@ -38,7 +61,7 @@ public class TestMatrix implements JUnit4Test {
org.junit.Assert.assertTrue("A.transposeTimesTranspose(B) does not equal (B.times(A)).transpose", B.times(A).transpose().almostEquals(AT_BT));
org.junit.Assert.assertTrue("A.transposeTimesTranspose(B) does not equal A.transpose.times(B.transpose)", A.transposeTimesTranspose(B).almostEquals(AT_BT));
}
-
+
private void randomizedTestAsymmetric() {
Random r = new Random();
int dim1 = r.nextInt(30) + 10;
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestQuickSelect.java b/test/de/lmu/ifi/dbs/elki/math/TestQuickSelect.java
index 36ed4521..132be182 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestQuickSelect.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestQuickSelect.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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 static org.junit.Assert.assertEquals;
import java.util.Arrays;
@@ -81,7 +104,6 @@ public class TestQuickSelect implements JUnit4Test {
assertEquals("Full median incorrect.", 0.95, QuickSelect.median(data), Double.MIN_VALUE);
}
-
@Test
public void testTies() {
double data[] = new double[] { 0.1, 0.1, 0.9, 0.9, 0.5, 0.9, 0.1, 0.1, 0.1, 0.9, 0.9, 0.9, 0.9, 0.1, 0.1 };
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestReplacingHistogram.java b/test/de/lmu/ifi/dbs/elki/math/TestReplacingHistogram.java
index e9e505d2..266a437f 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestReplacingHistogram.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestReplacingHistogram.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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 static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
@@ -10,13 +33,14 @@ import de.lmu.ifi.dbs.elki.utilities.pairs.Pair;
/**
* JUnit test to test the {@link ReplacingHistogram} class.
+ *
* @author Erich Schubert
*/
public class TestReplacingHistogram implements JUnit4Test {
ReplacingHistogram<Double> hist;
/**
- * Test that adds some data to the histogram and compares results.
+ * Test that adds some data to the histogram and compares results.
*/
@Test
public final void testHistogram() {
@@ -39,10 +63,10 @@ public class TestReplacingHistogram implements JUnit4Test {
hist.replace(-.13, -1.23 + hist.get(-.13));
hist.replace(1.13, -4.56 + hist.get(1.13));
assertArrayEquals("Resized histogram doesn't match", resized, hist.getData().toArray(new Double[0]));
-
+
// compare results via Iterator.
int off = 0;
- for (Pair<Double, Double> pair : hist) {
+ for(Pair<Double, Double> pair : hist) {
assertEquals("Array iterator bin position", -0.15 + 0.1 * off, pair.getFirst(), 0.00001);
assertEquals("Array iterator bin contents", resized[off], pair.getSecond(), 0.00001);
off++;
diff --git a/test/de/lmu/ifi/dbs/elki/math/TestWeightFunctions.java b/test/de/lmu/ifi/dbs/elki/math/TestWeightFunctions.java
index 8164e28e..f07be82a 100644
--- a/test/de/lmu/ifi/dbs/elki/math/TestWeightFunctions.java
+++ b/test/de/lmu/ifi/dbs/elki/math/TestWeightFunctions.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.math;
+/*
+ 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 static org.junit.Assert.assertEquals;
import org.junit.Test;
@@ -16,8 +39,9 @@ import de.lmu.ifi.dbs.elki.math.linearalgebra.pca.weightfunctions.WeightFunction
/**
* JUnit test to assert consistency of a couple of Weight functions
+ *
* @author Erich Schubert
- *
+ *
*/
public class TestWeightFunctions implements JUnit4Test {
/**
@@ -25,30 +49,26 @@ public class TestWeightFunctions implements JUnit4Test {
*/
@Test
public void testGetWeight() {
- WeightFunction[] wf = {new ConstantWeight(), new ErfcWeight(), new ErfcStddevWeight(),
- new GaussWeight(), new GaussStddevWeight(), new LinearWeight(), new ExponentialWeight()};
- double[] at0 = {1.0, 1.0, 1.0, 1.0, 0.3989422804014327, 1.0, 1.0};
- double[] at01 = {1.0, 0.8693490686884612, 0.920344325445942, 0.9772372209558107,
- 0.3969525474770118, 0.91, 0.7943282347242815};
- double[] at09 = {1.0, 0.13877499454059491, 0.36812025069351895, 0.15488166189124816,
- 0.2660852498987548, 0.18999999999999995, 0.12589254117941673};
- double[] at10 = {1.0, 0.10000000000000016, 0.317310507862914, 0.10000000000000002,
- 0.24197072451914337, 0.09999999999999998, 0.10000000000000002};
-
- assert(wf.length == at0.length);
- assert(wf.length == at01.length);
- assert(wf.length == at09.length);
- assert(wf.length == at10.length);
-
- for (int i=0; i < wf.length; i++) {
+ WeightFunction[] wf = { new ConstantWeight(), new ErfcWeight(), new ErfcStddevWeight(), new GaussWeight(), new GaussStddevWeight(), new LinearWeight(), new ExponentialWeight() };
+ double[] at0 = { 1.0, 1.0, 1.0, 1.0, 0.3989422804014327, 1.0, 1.0 };
+ double[] at01 = { 1.0, 0.8693490686884612, 0.920344325445942, 0.9772372209558107, 0.3969525474770118, 0.91, 0.7943282347242815 };
+ double[] at09 = { 1.0, 0.13877499454059491, 0.36812025069351895, 0.15488166189124816, 0.2660852498987548, 0.18999999999999995, 0.12589254117941673 };
+ double[] at10 = { 1.0, 0.10000000000000016, 0.317310507862914, 0.10000000000000002, 0.24197072451914337, 0.09999999999999998, 0.10000000000000002 };
+
+ assert (wf.length == at0.length);
+ assert (wf.length == at01.length);
+ assert (wf.length == at09.length);
+ assert (wf.length == at10.length);
+
+ for(int i = 0; i < wf.length; i++) {
double val0 = wf[i].getWeight(0, 1, 1);
double val01 = wf[i].getWeight(0.1, 1, 1);
double val09 = wf[i].getWeight(0.9, 1, 1);
double val10 = wf[i].getWeight(1.0, 1, 1);
- assertEquals(wf[i].getClass().getSimpleName()+" at 0.0", at0[i], val0, Double.MIN_VALUE);
- assertEquals(wf[i].getClass().getSimpleName()+" at 0.1", at01[i], val01, Double.MIN_VALUE);
- assertEquals(wf[i].getClass().getSimpleName()+" at 0.9", at09[i], val09, Double.MIN_VALUE);
- assertEquals(wf[i].getClass().getSimpleName()+" at 1.0", at10[i], val10, Double.MIN_VALUE);
+ assertEquals(wf[i].getClass().getSimpleName() + " at 0.0", at0[i], val0, Double.MIN_VALUE);
+ assertEquals(wf[i].getClass().getSimpleName() + " at 0.1", at01[i], val01, Double.MIN_VALUE);
+ assertEquals(wf[i].getClass().getSimpleName() + " at 0.9", at09[i], val09, Double.MIN_VALUE);
+ assertEquals(wf[i].getClass().getSimpleName() + " at 1.0", at10[i], val10, Double.MIN_VALUE);
}
}
diff --git a/test/de/lmu/ifi/dbs/elki/persistent/TestByteArrayUtil.java b/test/de/lmu/ifi/dbs/elki/persistent/TestByteArrayUtil.java
index 7cd14c14..769b3fe2 100644
--- a/test/de/lmu/ifi/dbs/elki/persistent/TestByteArrayUtil.java
+++ b/test/de/lmu/ifi/dbs/elki/persistent/TestByteArrayUtil.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.persistent;
+/*
+ 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.nio.ByteBuffer;
import org.junit.Assert;
diff --git a/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskArray.java b/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskArray.java
index 67a51d0d..910e4898 100644
--- a/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskArray.java
+++ b/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskArray.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.persistent;
+/*
+ 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.File;
import java.io.IOException;
import java.nio.ByteBuffer;
diff --git a/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskUpperTriangleMatrix.java b/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskUpperTriangleMatrix.java
index e076da1a..2690a651 100644
--- a/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskUpperTriangleMatrix.java
+++ b/test/de/lmu/ifi/dbs/elki/persistent/TestOnDiskUpperTriangleMatrix.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.persistent;
+/*
+ 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.File;
import java.io.IOException;
@@ -12,8 +35,9 @@ import de.lmu.ifi.dbs.elki.JUnit4Test;
/**
* Test the on-disk OnDiskUpperTriangleMatrix class.
+ *
* @author Erich Schubert
- *
+ *
*/
// TODO: also test with a static sample file.
public class TestOnDiskUpperTriangleMatrix implements JUnit4Test {
@@ -21,6 +45,7 @@ public class TestOnDiskUpperTriangleMatrix implements JUnit4Test {
/**
* Check that we don't overwrite any file.
+ *
* @throws Exception on errors.
*/
@Before
@@ -32,6 +57,7 @@ public class TestOnDiskUpperTriangleMatrix implements JUnit4Test {
/**
* Clean up afterwards
+ *
* @throws Exception on errors.
*/
@After
@@ -45,6 +71,7 @@ public class TestOnDiskUpperTriangleMatrix implements JUnit4Test {
/**
* Test the ondisk triangle matrix
+ *
* @throws IOException on errors.
*/
@Test
@@ -74,21 +101,21 @@ public class TestOnDiskUpperTriangleMatrix implements JUnit4Test {
OnDiskUpperTriangleMatrix roarray = new OnDiskUpperTriangleMatrix(file, 1, extraheadersize, recsize, false);
Assert.assertEquals("Number of records incorrect.", matsize, roarray.getMatrixSize());
-
+
byte[] buf = new byte[recsize];
- roarray.getRecordBuffer(0,0).get(buf);
+ roarray.getRecordBuffer(0, 0).get(buf);
Assert.assertArrayEquals("Record 0,0 doesn't match.", record1, buf);
- roarray.getRecordBuffer(0,1).get(buf);
+ roarray.getRecordBuffer(0, 1).get(buf);
Assert.assertArrayEquals("Record 0,1 doesn't match.", record2, buf);
- roarray.getRecordBuffer(1,1).get(buf);
+ roarray.getRecordBuffer(1, 1).get(buf);
Assert.assertArrayEquals("Record 1,1 doesn't match.", record3, buf);
- roarray.getRecordBuffer(1,0).get(buf);
+ roarray.getRecordBuffer(1, 0).get(buf);
Assert.assertArrayEquals("Record 1,0 doesn't match.", record2, buf);
- roarray.getRecordBuffer(0,2).get(buf);
+ roarray.getRecordBuffer(0, 2).get(buf);
Assert.assertArrayEquals("Record 0,2 doesn't match.", record3, buf);
- roarray.getRecordBuffer(1,2).get(buf);
+ roarray.getRecordBuffer(1, 2).get(buf);
Assert.assertArrayEquals("Record 1,2 doesn't match.", record2, buf);
- roarray.getRecordBuffer(2,2).get(buf);
+ roarray.getRecordBuffer(2, 2).get(buf);
Assert.assertArrayEquals("Record 2,2 doesn't match.", record1, buf);
}
}
diff --git a/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestHeap.java b/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestHeap.java
index 44c84f83..fcdc28d2 100644
--- a/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestHeap.java
+++ b/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestHeap.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.utilities.datastructures;
+/*
+ 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 static org.junit.Assert.assertEquals;
import java.util.Collections;
@@ -31,11 +54,11 @@ public class TestHeap {
}
for(int i = 0; i < asc.length; i++) {
final Integer gota = hasc.poll();
- assertEquals("Objects sorted incorrectly at ascending position "+i, asc[i], gota);
+ assertEquals("Objects sorted incorrectly at ascending position " + i, asc[i], gota);
}
for(int i = 0; i < desc.length; i++) {
final Integer gotd = hdesc.poll();
- assertEquals("Objects sorted incorrectly at descending position "+i, desc[i], gotd);
+ assertEquals("Objects sorted incorrectly at descending position " + i, desc[i], gotd);
}
}
}
diff --git a/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTiedTopBoundedHeap.java b/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTiedTopBoundedHeap.java
index 829c5880..cb4492b8 100644
--- a/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTiedTopBoundedHeap.java
+++ b/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTiedTopBoundedHeap.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.utilities.datastructures;
+/*
+ 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 static org.junit.Assert.assertEquals;
import java.util.Collections;
@@ -29,18 +52,19 @@ public class TestTiedTopBoundedHeap {
hasc.add(i);
hdesc.add(i);
}
- //LoggingUtil.warning("Heap: "+hasc.toString()+ " -- "+hdesc.toString());
+ // LoggingUtil.warning("Heap: "+hasc.toString()+ " -- "+hdesc.toString());
assertEquals("Ascending heap size doesn't match", asc.length, hasc.size());
assertEquals("Descending heap size doesn't match", desc.length, hdesc.size());
for(int i = 0; i < asc.length; i++) {
final Integer gota = hasc.poll();
- assertEquals("Objects sorted incorrectly at ascending position "+i, asc[i], gota);
+ assertEquals("Objects sorted incorrectly at ascending position " + i, asc[i], gota);
}
for(int i = 0; i < desc.length; i++) {
final Integer gotd = hdesc.poll();
- assertEquals("Objects sorted incorrectly at descending position "+i, desc[i], gotd);
+ assertEquals("Objects sorted incorrectly at descending position " + i, desc[i], gotd);
}
}
+
/**
* Test bounded heap
*/
diff --git a/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTopBoundedHeap.java b/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTopBoundedHeap.java
index c1fc3a66..f0160d5e 100644
--- a/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTopBoundedHeap.java
+++ b/test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTopBoundedHeap.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.utilities.datastructures;
+/*
+ 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 static org.junit.Assert.assertEquals;
import java.util.Collections;
@@ -31,11 +54,11 @@ public class TestTopBoundedHeap {
}
for(int i = 0; i < asc.length; i++) {
final Integer gota = hasc.poll();
- assertEquals("Objects sorted incorrectly at ascending position "+i, asc[i], gota);
+ assertEquals("Objects sorted incorrectly at ascending position " + i, asc[i], gota);
}
for(int i = 0; i < desc.length; i++) {
final Integer gotd = hdesc.poll();
- assertEquals("Objects sorted incorrectly at descending position "+i, desc[i], gotd);
+ assertEquals("Objects sorted incorrectly at descending position " + i, desc[i], gotd);
}
}
}
diff --git a/test/de/lmu/ifi/dbs/elki/visualization/TestLinearScale.java b/test/de/lmu/ifi/dbs/elki/visualization/TestLinearScale.java
index 8a303f4c..e4ca972b 100644
--- a/test/de/lmu/ifi/dbs/elki/visualization/TestLinearScale.java
+++ b/test/de/lmu/ifi/dbs/elki/visualization/TestLinearScale.java
@@ -1,5 +1,28 @@
package de.lmu.ifi.dbs.elki.visualization;
+/*
+ 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 static org.junit.Assert.assertEquals;
import org.junit.Test;
@@ -7,24 +30,24 @@ import org.junit.Test;
import de.lmu.ifi.dbs.elki.JUnit4Test;
import de.lmu.ifi.dbs.elki.visualization.scales.LinearScale;
-
/**
* Test class to test rounding of the linear scale.
*
* @author Erich Schubert
- *
+ *
*/
public class TestLinearScale implements JUnit4Test {
/**
- * Produces a simple linear scale and verifies the tick lines are placed as expected.
+ * Produces a simple linear scale and verifies the tick lines are placed as
+ * expected.
*/
@Test
public final void testLinearScale() {
- LinearScale a = new LinearScale(3,97);
+ LinearScale a = new LinearScale(3, 97);
assertEquals("Minimum for scale 3-97 not as expected.", 0.0, a.getMin(), Double.MIN_VALUE);
assertEquals("Maximum for scale 3-97 not as expected.", 100.0, a.getMax(), Double.MIN_VALUE);
-
+
LinearScale b = new LinearScale(-97, -3);
assertEquals("Minimum for scale -97 : -3 not as expected.", -100.0, b.getMin(), Double.MIN_VALUE);
assertEquals("Maximum for scale -97 : -3 not as expected.", 0.0, b.getMax(), Double.MIN_VALUE);
@@ -32,7 +55,7 @@ public class TestLinearScale implements JUnit4Test {
LinearScale c = new LinearScale(-3, 37);
assertEquals("Minimum for scale -3 : 37 not as expected.", -10.0, c.getMin(), Double.MIN_VALUE);
assertEquals("Maximum for scale -3 : 37 not as expected.", 40.0, c.getMax(), Double.MIN_VALUE);
-
+
LinearScale d = new LinearScale(-37, 3);
assertEquals("Minimum for scale -37 : 3 not as expected.", -40.0, d.getMin(), Double.MIN_VALUE);
assertEquals("Maximum for scale -37 : 3 not as expected.", 10.0, d.getMax(), Double.MIN_VALUE);