diff options
author | Andrej Shadura <andrewsh@debian.org> | 2019-03-09 22:30:38 +0000 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2019-03-09 22:30:38 +0000 |
commit | 14a486343aef55f97f54082d6b542dedebf6f3ba (patch) | |
tree | 000fcc4968578771ad265079eef7617d66de2cda /src/de/lmu/ifi/dbs/elki/datasource/filter/normalization/AttributeWiseCDFNormalization.java | |
parent | 8300861dc4c62c5567a4e654976072f854217544 (diff) |
Import Upstream version 0.6.0
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/datasource/filter/normalization/AttributeWiseCDFNormalization.java')
-rw-r--r-- | src/de/lmu/ifi/dbs/elki/datasource/filter/normalization/AttributeWiseCDFNormalization.java | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/datasource/filter/normalization/AttributeWiseCDFNormalization.java b/src/de/lmu/ifi/dbs/elki/datasource/filter/normalization/AttributeWiseCDFNormalization.java index 8fd46336..dd86cc5a 100644 --- a/src/de/lmu/ifi/dbs/elki/datasource/filter/normalization/AttributeWiseCDFNormalization.java +++ b/src/de/lmu/ifi/dbs/elki/datasource/filter/normalization/AttributeWiseCDFNormalization.java @@ -123,7 +123,7 @@ public class AttributeWiseCDFNormalization<V extends NumberVector<?>> implements // We iterate over dimensions, this kind of filter needs fast random // access. - Adapter<V> adapter = new Adapter<>(); + Adapter adapter = new Adapter(); for (int d = 0; d < dim; d++) { adapter.dim = d; if (estimators.size() == 1) { @@ -208,50 +208,56 @@ public class AttributeWiseCDFNormalization<V extends NumberVector<?>> implements return result.toString(); } - private static class Adapter<V extends NumberVector<?>> implements NumberArrayAdapter<Double, List<V>> { + /** + * Array adapter class for vectors. + * + * @author Erich Schubert + * + * @apiviz.exclude + */ + private static class Adapter implements NumberArrayAdapter<Double, List<? extends NumberVector<?>>> { /** * Dimension to process. */ - int dim; @Override - public int size(List<V> array) { + public int size(List<? extends NumberVector<?>> array) { return array.size(); } @Override - public Double get(List<V> array, int off) throws IndexOutOfBoundsException { + public Double get(List<? extends NumberVector<?>> array, int off) throws IndexOutOfBoundsException { return getDouble(array, off); } @Override - public double getDouble(List<V> array, int off) throws IndexOutOfBoundsException { + public double getDouble(List<? extends NumberVector<?>> array, int off) throws IndexOutOfBoundsException { return array.get(off).doubleValue(dim); } @Override - public float getFloat(List<V> array, int off) throws IndexOutOfBoundsException { + public float getFloat(List<? extends NumberVector<?>> array, int off) throws IndexOutOfBoundsException { return array.get(off).floatValue(dim); } @Override - public int getInteger(List<V> array, int off) throws IndexOutOfBoundsException { + public int getInteger(List<? extends NumberVector<?>> array, int off) throws IndexOutOfBoundsException { return array.get(off).intValue(dim); } @Override - public short getShort(List<V> array, int off) throws IndexOutOfBoundsException { + public short getShort(List<? extends NumberVector<?>> array, int off) throws IndexOutOfBoundsException { return array.get(off).shortValue(dim); } @Override - public long getLong(List<V> array, int off) throws IndexOutOfBoundsException { + public long getLong(List<? extends NumberVector<?>> array, int off) throws IndexOutOfBoundsException { return array.get(off).longValue(dim); } @Override - public byte getByte(List<V> array, int off) throws IndexOutOfBoundsException { + public byte getByte(List<? extends NumberVector<?>> array, int off) throws IndexOutOfBoundsException { return array.get(off).byteValue(dim); } } |