create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / optimization / general / Function.java
1 package net.sf.openrocket.optimization.general;
2
3 /**
4  * An interface defining an optimizable function.
5  * <p>
6  * Some function optimizers require that the function is thread-safe.
7  * 
8  * @author Sampo Niskanen <sampo.niskanen@iki.fi>
9  */
10 public interface Function {
11         
12         /**
13          * Evaluate the function at the specified point.
14          * <p>
15          * If the function evaluation is slow, then this method should abort the computation if
16          * the thread is interrupted.
17          * 
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
22          */
23         public double evaluate(Point point) throws InterruptedException, OptimizationException;
24         
25 }