|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Normalisation>
uk.ac.starlink.ttools.plot2.layer.Normalisation
@Equality public enum Normalisation
Defines normalisation modes for histogram-like plots.
Enum Constant Summary | |
---|---|
AREA
The total area of histogram bars is normalised to unity. |
|
HEIGHT
The total height of histogram bars is normalised to unity. |
|
MAXIMUM
Height of the tallest histogram bar is normalised to unity. |
|
NONE
No normalisation is performed. |
Method Summary | |
---|---|
String |
getDescription()
Returns a short description of this mode. |
abstract double |
getScaleFactor(double sum,
double max,
double binWidth,
boolean isCumulative)
Returns the value by which all bins should be scaled to achieve normalisation for a given data set. |
static Normalisation |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Normalisation[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Normalisation NONE
public static final Normalisation AREA
public static final Normalisation MAXIMUM
public static final Normalisation HEIGHT
Method Detail |
---|
public static final Normalisation[] values()
for(Normalisation c : Normalisation.values()) System.out.println(c);
public static Normalisation valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic String getDescription()
public abstract double getScaleFactor(double sum, double max, double binWidth, boolean isCumulative)
The binWidth
should at least make sense in terms
of screen area. For linear X axis, it can be in data units,
but for logarithmic X axis it may have to be in log(data units).
The binWidth
is only used by AREA mode.
For cumulative plots, all the modes except NONE behave the same, normalising the total value to unity.
sum
- total height of all histogram barsmax
- height of tallest histogram barbinWidth
- constant linear width of histogram bars, or NaNisCumulative
- true iff the plot is cumulative
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |