diff options
Diffstat (limited to 'test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTiedTopBoundedHeap.java')
-rw-r--r-- | test/de/lmu/ifi/dbs/elki/utilities/datastructures/TestTiedTopBoundedHeap.java | 30 |
1 files changed, 27 insertions, 3 deletions
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 */ |