1 package net.sf.openrocket.optimization.general;
4 * An interface defining an optimizable function.
6 * Some function optimizers require that the function is thread-safe.
8 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
10 public interface Function {
13 * Evaluate the function at the specified point.
15 * If the function evaluation is slow, then this method should abort the computation if
16 * the thread is interrupted.
18 * @param point the point at which to evaluate the function.
19 * @return the function value.
20 * @throws InterruptedException if the thread was interrupted before function evaluation was completed.
21 * @throws OptimizationException if an error occurs that prevents the optimization
23 public double evaluate(Point point) throws InterruptedException, OptimizationException;