summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/ObjHistogram.java
diff options
context:
space:
mode:
authorErich Schubert <erich@debian.org>2012-12-14 20:45:15 +0100
committerAndrej Shadura <andrewsh@debian.org>2019-03-09 22:30:35 +0000
commit357b2761a2c0ded8cad5e4d3c1e667b7639ff7a6 (patch)
tree3dd8947bb70a67c221adc3cd4359ba1d385e2f3c /src/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/ObjHistogram.java
parent4343785ebed9d4145f417d86d581f18a0d31e4ac (diff)
parentb7b404fd7a726774d442562d11659d7b5368cdb9 (diff)
Import Debian changes 0.5.5-1
elki (0.5.5-1) unstable; urgency=low * New upstream release: 0.5.5 interim release.
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/ObjHistogram.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/ObjHistogram.java69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/ObjHistogram.java b/src/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/ObjHistogram.java
new file mode 100644
index 00000000..ac4d4e4b
--- /dev/null
+++ b/src/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/ObjHistogram.java
@@ -0,0 +1,69 @@
+package de.lmu.ifi.dbs.elki.utilities.datastructures.histogram;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2012
+ 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/>.
+ */
+
+/**
+ * Basic interface for object based histograms (static and flexible).
+ *
+ * @author Erich Schubert
+ *
+ * @apiviz.has Iter
+ *
+ * @param <T> data type
+ */
+public interface ObjHistogram<T> extends Histogram {
+ /**
+ * Get a histogram iterator.
+ *
+ * @return Iterator
+ */
+ @Override
+ public Iter<T> iter();
+
+ /**
+ * Aggregate new data into the histogram.
+ *
+ * Note that the actual definition of "aggregate" depends on the application.
+ * While a static histogram will likely perform this immediately, a flexible
+ * histogram will cache a number of observations.
+ *
+ * @param coord Coordinate
+ * @param data Data
+ */
+ public void putData(double coord, T data);
+
+ /**
+ * Histogram iterator.
+ *
+ * @author Erich Schubert
+ */
+ public static interface Iter<T> extends Histogram.Iter {
+ /**
+ * Get the value of the bin.
+ *
+ * @return Bin value
+ */
+ public T getValue();
+ }
+}