create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / gui / dialogs / optimization / FunctionEvaluationData.java
1 package net.sf.openrocket.gui.dialogs.optimization;
2
3 import net.sf.openrocket.optimization.general.Point;
4 import net.sf.openrocket.unit.Value;
5
6 /**
7  * Value object for function evaluation information.
8  * 
9  * @author Sampo Niskanen <sampo.niskanen@iki.fi>
10  */
11 public class FunctionEvaluationData {
12         
13         private final Point point;
14         private final Value[] state;
15         private final Value domainReference;
16         private final Value parameterValue;
17         private final double goalValue;
18         
19         
20         public FunctionEvaluationData(Point point, Value[] state, Value domainReference, Value parameterValue, double goalValue) {
21                 this.point = point;
22                 this.state = state.clone();
23                 this.domainReference = domainReference;
24                 this.parameterValue = parameterValue;
25                 this.goalValue = goalValue;
26         }
27         
28         
29         /**
30          * Return the function evaluation point (in 0...1 range).
31          */
32         public Point getPoint() {
33                 return point;
34         }
35         
36         
37         /**
38          * Return the function evaluation state in SI units + units.
39          */
40         public Value[] getState() {
41                 return state;
42         }
43         
44         
45         /**
46          * Return the domain description.
47          */
48         public Value getDomainReference() {
49                 return domainReference;
50         }
51         
52         
53         /**
54          * Return the optimization parameter value (or NaN is outside of domain).
55          */
56         public Value getParameterValue() {
57                 return parameterValue;
58         }
59         
60         
61         /**
62          * Return the function goal value.
63          */
64         public double getGoalValue() {
65                 return goalValue;
66         }
67 }