create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / optimization / general / FunctionCache.java
1 package net.sf.openrocket.optimization.general;
2
3 /**
4  * A storage of cached values of a function.  The purpose of this class is to
5  * cache function values between optimization runs.  Subinterfaces may provide
6  * additional functionality.
7  * 
8  * @author Sampo Niskanen <sampo.niskanen@iki.fi>
9  */
10 public interface FunctionCache {
11         
12         /**
13          * Compute and return the value of the function at the specified point.
14          * 
15          * @param point         the point at which to evaluate.
16          * @return                      the value of the function at that point.
17          */
18         public double getValue(Point point);
19         
20         /**
21          * Clear the cache.
22          */
23         public void clearCache();
24         
25         /**
26          * Return the function that is evaluated by this cache implementation.
27          * 
28          * @return      the function that is being evaluated.
29          */
30         public Function getFunction();
31         
32         /**
33          * Set the function that is evaluated by this cache implementation.
34          * 
35          * @param function      the function that is being evaluated.
36          */
37         public void setFunction(Function function);
38         
39 }