public class P2DRange1D extends Fwk implements P2DRange1DInterface
,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
double |
lower
The lower limit of the range.
|
double |
minPositiveValue
The minimum of the positive values.
|
double |
upper
The upper limit of the range.
|
static java.lang.String |
version |
| Constructor and Description |
|---|
P2DRange1D()
The default constructor.
|
P2DRange1D(double lower,
double upper)
The constructor receives the predifined limits.
|
P2DRange1D(double lower,
double upper,
double minPositiveValue)
The constructor receives the predifined limits.
|
P2DRange1D(P2DRange1DInterface range)
The constructor receiving another range.
|
P2DRange1D(P2DRange1DInterface range,
double minPositiveValue)
The constructor receiving another range.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(double value)
This method checks whether the range contains the given point.
|
boolean |
equals(P2DRange1DInterface r)
Compare this range with the given.
|
double |
getDistance()
Returns the distance of the range.
|
double |
getLower()
Retrieves the lower limit of the range.
|
double |
getMinPositiveValue()
Get the lowest value that is greater than 0.
|
double[] |
getNiceNumbers(double base,
boolean isLog,
int ticks_requested)
Get the nicenumber vector of Double's from axis.
|
double[] |
getNiceNumbers(double min,
double max,
double base,
boolean isLog,
int ticks_requested)
Get the nicenumber vector of Double's from axis.
|
static double[] |
getNiceNumbersImpl(double min,
double max,
double base,
boolean isLog,
double minPositive,
int ticks_requested)
The implementation of the nicenumber algorithmn.
|
java.lang.String |
getParams()
Get the parameter string.
|
double |
getUpper()
Retrieves the upper limit of the range.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
static void |
main(java.lang.String[] args) |
void |
move(double distance)
Move the range.
|
void |
setDefaults()
Set all the internal properties to the default.
|
void |
setDistance(double distance)
Sets the length of the range.
|
void |
setLower(double lower)
Sets the lower limit of the range.
|
void |
setMinPositiveValue(double minPositiveValue)
Set the lowest value that is greater than 0.
|
void |
setRange(double lower,
double upper)
Set the range.
|
void |
setUpper(double upper)
Sets the upper limit of the range.
|
java.lang.String |
toString()
Get the string representation of the object.
|
getNiceVersion, releaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitreleasepublic static final java.lang.String version
public double lower
public double minPositiveValue
public double upper
public P2DRange1D()
public P2DRange1D(P2DRange1DInterface range)
range - The source range.public P2DRange1D(P2DRange1DInterface range, double minPositiveValue)
range - The source range.minPositiveValue - the minimum positive value.public P2DRange1D(double lower,
double upper)
lower - the lower value.upper - the upper value.public P2DRange1D(double lower,
double upper,
double minPositiveValue)
lower - the lower value.upper - the upper value.minPositiveValue - the minimum positive value.public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacegetVersion in class Fwkpublic boolean contains(double value)
contains in interface P2DRange1DInterfacevalue - The value to be checked.public double getLower()
getLower in interface P2DRange1DInterfacegetUpper(),
getDistance()public void setLower(double lower)
setLower in interface P2DRange1DInterfacelower - The new lower limit of the range.setUpper(double),
setDistance(double)public double getMinPositiveValue()
getMinPositiveValue in interface P2DRange1DInterfacepublic void setMinPositiveValue(double minPositiveValue)
setMinPositiveValue in interface P2DRange1DInterfaceminPositiveValue - the lowest value that is greater than 0. If no value is greater
than 0 the method returns Double.NaN.public double getUpper()
getUpper in interface P2DRange1DInterfacegetLower(),
getDistance()public void setUpper(double upper)
setUpper in interface P2DRange1DInterfacelower - The new lower limit of the range.setUpper(double),
setDistance(double)public void setRange(double lower,
double upper)
setRange in interface P2DRange1DInterfacelower - The new lower limit of the range.upper - The new upper limit of the range.public double getDistance()
getDistance in interface P2DRange1DInterfacegetLower(),
getUpper()public void setDistance(double distance)
setDistance in interface P2DRange1DInterfacelower - The new lower limit of the range.setLower(double),
setUpper(double)public void move(double distance)
move in interface P2DRange1DInterfacedistance - The value of the distance.public boolean equals(P2DRange1DInterface r)
equals in interface P2DRange1DInterfacer - The range that should be compared to this.public java.lang.String getParams()
getParams in interface P2DRange1DInterfacepublic java.lang.String toString()
toString in class java.lang.Objectpublic void setDefaults()
setDefaults in interface P2DRange1DInterfacepublic double[] getNiceNumbers(double base,
boolean isLog,
int ticks_requested)
getNiceNumbers in interface P2DRange1DInterfacebase - The log base. If <= 1 then 10.isLog - A boolean indicates that the scale should be logarithmic.ticks_requested - The total number of requested tick values.
If this parameter is 0 the routine will optimized the value.public double[] getNiceNumbers(double min,
double max,
double base,
boolean isLog,
int ticks_requested)
min - The minimum value of the range.max - The maximum of the range.base - The log base. If <= 1 then 10.isLog - A boolean indicates that the scale should be logarithmic.ticks_requested - The total number of requested tick values.
If this parameter is 0 the routine will optimized the value.public static double[] getNiceNumbersImpl(double min,
double max,
double base,
boolean isLog,
double minPositive,
int ticks_requested)
min - The minimum value of the range.max - The maximum of the range.base - The log base. If <= 1 then 10.isLog - A boolean indicates that the scale should be logarithmic.minPositive - the minimum positive value.ticks_requested - The total number of requested tick values.
If this parameter is 0 the routine will optimized the value.public static void main(java.lang.String[] args)