Package hec.lang
Class ScaleBobz
java.lang.Object
hec.lang.ScaleBobz
Title: ScaleBobz - Computes scale for tabulations
Description: Provides capability of scaling data to be "nice" numbers for a selected
number of divisions or range of divisions from user supllied minimum and
maximum data values. Useful for determining axis labeling and array of
stages for stage-damage. It uses x*10**n where x is 1, 2, or 5 (plus or
minus).
Company:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static int
scaleValues
(int i1_div, int i2_div, double[] base_number, int nu_base_number, double d_min, double d_max, double[] scaleParams) Scale the range of data from d_min through d_max broken into the best number of intervals between i1_div and i2_div (they may be equal).static int
scaleValues
(int i1_div, int i2_div, double d_min, double d_max, double[] scaleParams) Scale the range of data from d_min through d_max broken into the best number of intervals between i1_div and i2_div (they may be equal).
-
Constructor Details
-
ScaleBobz
public ScaleBobz()
-
-
Method Details
-
scaleValues
public static int scaleValues(int i1_div, int i2_div, double d_min, double d_max, double[] scaleParams) Scale the range of data from d_min through d_max broken into the best number of intervals between i1_div and i2_div (they may be equal). You must have allocated scaleParams[3] before calling this routine as it contains the results. It also returns the number of divisions. returns number of divisions scaleParams is min, max, interval ------------------------------------------------------------------ Input Arguments i1_div Minimum number of class intervals i2_div Maximum number of class intervals d_min Minimum value of the data d_max Maximum value of data Output Results ns_div Number of class intervals (between i1_div and i2_div inclusive) ds_min Minimum (starting) value for class intervals (scaleParams[0]) ds_max Maximum (ending) value for class intervals (scaleParams[1]) ds_intrvl Interval between each class interval (scaleParams[2]) -
scaleValues
public static int scaleValues(int i1_div, int i2_div, double[] base_number, int nu_base_number, double d_min, double d_max, double[] scaleParams) Scale the range of data from d_min through d_max broken into the best number of intervals between i1_div and i2_div (they may be equal). You must have allocated scaleParams[3] before calling this routine as it contains the results. It also returns the number of divisions. returns number of divisions scaleParams is min, max, interval ------------------------------------------------------------------ Input Arguments i1_div Minimum number of class intervals i2_div Maximum number of class intervals base_number Array of numbers to use for determining class interval nu_base_number Number of values in base_number. If set to zero, scalev will use three values: 1, 2, 5. d_min Minimum value of the data d_max Maximum value of data Output Results ns_div Number of class intervals (between i1_div and i2_div inclusive) ds_min Minimum (starting) value for class intervals (scaleParams[0]) ds_max Maximum (ending) value for class intervals (scaleParams[1]) ds_intrvl Interval between each class interval (scaleParams[2]) -
main
-