All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.ethz.globis.phtree.pre.ExponentPP Maven / Gradle / Ivy

There is a newer version: 2.8.1
Show newest version
/*
 * 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