|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.data.DataRange
public class DataRange
Holds a simple min/max range
Field Summary | |
---|---|
double |
max
The range |
double |
min
The range |
Constructor Summary | |
---|---|
DataRange()
Default ctor |
|
DataRange(DataRange r)
copy ctor |
|
DataRange(double[] a)
ctor |
|
DataRange(double min,
double max)
Create a range with min, max |
Method Summary | |
---|---|
double[] |
asArray()
Get a 2-aray array holding min/max |
float[] |
asFloatArray()
Get a 2-aray array holding min/max |
boolean |
equals(Object o)
Equals |
double |
getAbsSpan()
get abs(max-min) |
double |
getMax()
Get the max |
double |
getMid()
Get the mid point |
double |
getMin()
Get the min |
double |
getPercent(double v)
Ge tthe percent the given value is between min and max |
double |
getSpan()
max-min |
double |
getValueOfPercent(double percent)
Get percent along the way between min and max |
void |
set(double min,
double max)
set the values |
void |
setMax(double v)
Set the max |
void |
setMax(int v)
Set the max |
void |
setMin(double v)
Set the min |
void |
setMin(int v)
Set the min |
double |
span()
max-min |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double min
public double max
Constructor Detail |
---|
public DataRange()
public DataRange(double min, double max)
min
- minmax
- maxpublic DataRange(double[] a)
a
- 2-ary array holding min/maxpublic DataRange(DataRange r)
r
- objectMethod Detail |
---|
public boolean equals(Object o)
equals
in class Object
o
- Object
public void set(double min, double max)
min
- minmax
- maxpublic double getMin()
public double getMax()
public void setMin(double v)
v
- valuepublic void setMax(double v)
v
- valuepublic void setMin(int v)
v
- valuepublic void setMax(int v)
v
- valuepublic double[] asArray()
public float[] asFloatArray()
public double span()
public double getSpan()
public double getAbsSpan()
public double getMid()
public double getValueOfPercent(double percent)
percent
- percent
public double getPercent(double v)
v
- value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |