ch.ethz.globis.phtree.pre.ExponentPP Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phtree Show documentation
Show all versions of phtree Show documentation
The PH-Tree is a multi-dimensional index
/*
* Copyright 2011-2016 ETH Zurich. All Rights Reserved.
*
* This software is the proprietary information of ETH Zurich.
* Use is subject to license terms.
*/
package ch.ethz.globis.phtree.pre;
import java.util.Arrays;
import ch.ethz.globis.phtree.util.BitTools;
public class ExponentPP implements PreProcessorPointF {
private double[] disp;
public ExponentPP(double[] displacements) {
this.disp = Arrays.copyOf(displacements, displacements.length);
}
@Override
public void pre(double[] raw, long[] pre) {
for (int d=0; d= disp.length) {
throw new IllegalArgumentException("Supplied dim is out of bounds");
}
return disp[dim];
}
@Override
public long pre(double raw) {
throw new UnsupportedOperationException();
//return BitTools.toSortableLong(raw + disp[d]);
}
@Override
public double post(long pre) {
throw new UnsupportedOperationException();
//return BitTools.toDouble(pre) - disp[d];
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy