|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.analysis.optimization.PointCostPair
public class PointCostPair
This class holds a point and its associated cost.
A cost/point pair is not evaluated at build time. Its associated cost set toDouble.NaN until it is evaluated.
CostFunction| Constructor Summary | |
|---|---|
PointCostPair(double[] point)
Build a point/cost pair with non-evaluated cost. |
|
| Method Summary | |
|---|---|
double |
getCost()
Get the cost. |
double[] |
getPoint()
Get the point coordinates. |
boolean |
isEvaluated()
Check if the cost has been evaluated. |
void |
setCost(double cost)
Set the cost. |
double[] |
setPoint(double[] point)
Reset the point coordinates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PointCostPair(double[] point)
point - point coordinates| Method Detail |
|---|
public double[] setPoint(double[] point)
point - new point coordinates
public double[] getPoint()
public void setCost(double cost)
cost - cost to store in the instance (can be
Double.NaN to reset the instance to non-evaluated)public double getCost()
Double.NaN if the
instance is not evaluated)public boolean isEvaluated()
Double.isNaN(pair.getCost()) would return true
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||