package ec.gp.semantic.library;

import ec.EvolutionState;
import ec.gp.semantic.DesiredSemanticsBase;
import ec.util.Parameter;
import library.distance.IDistanceTo;

public class DoubleStaticLibraryFactory implements ILibraryFactory<Double>, IDistanceToFactory<double[]> {

	@Override
	public ILibrary<Double> getLibrary(EvolutionState state, Parameter base) {
		return new StaticLibrary<Double, double[]>(state, base, this, new DoubleConstantGenerator(state));
	}

	@Override
	public IDistanceTo<double[]> getDistanceToSet(EvolutionState state, DesiredSemanticsBase<?> desired, DesiredSemanticsBase<?>... forbidden) {
		return new DoubleDistanceToSet(state, (DesiredSemanticsBase<Double>) desired, (DesiredSemanticsBase<Double>[]) forbidden);
	}

}
