Package adams.opt.optimise
Class OptVar
- java.lang.Object
-
- adams.opt.optimise.OptVar
-
- All Implemented Interfaces:
CloneHandler<OptVar>
,Serializable
public class OptVar extends Object implements Serializable, CloneHandler<OptVar>
Optimisation Variables.- Version:
- $Revision$
- Author:
- dale
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description boolean
m_isInteger
Can this variable only have integer values?double
m_max
Maximum value this variable can assume.double
m_min
Minimum value this variable can assume.String
m_name
This variable's name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OptVar
getClone()
Copy this object.int
getSteps(int numSplits)
Get number of splits.double
getStepSize(int numSplits)
Get step size.String
toString()
-
-
-
Field Detail
-
m_name
public String m_name
This variable's name.
-
m_max
public double m_max
Maximum value this variable can assume.
-
m_min
public double m_min
Minimum value this variable can assume.
-
m_isInteger
public boolean m_isInteger
Can this variable only have integer values?
-
-
Constructor Detail
-
OptVar
public OptVar(String name, double min, double max, boolean isInteger)
Initialise.- Parameters:
name
- var name.min
- var min.max
- var max.isInteger
- var is an integer only?
-
OptVar
public OptVar(String name, double min, double max)
Initialise.- Parameters:
name
- var name.min
- var min.max
- var max.
-
-
Method Detail
-
getClone
public OptVar getClone()
Copy this object.- Specified by:
getClone
in interfaceCloneHandler<OptVar>
- Returns:
- copy
-
getSteps
public int getSteps(int numSplits)
Get number of splits. Recalc if int.- Parameters:
numSplits
- number of initial splits- Returns:
- number of recalculated splits
-
getStepSize
public double getStepSize(int numSplits)
Get step size. Recalc for int.- Parameters:
numSplits
- number of initial splits- Returns:
- splits recalc
-
-