| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

全部 类 命名空间 文件 函数 变量 枚举值 页
静态 Public 成员函数 | 静态 Public 属性 | Private 成员函数 | 静态 Private 成员函数 | 静态 Private 属性 | 所有成员列表
com.ab.view.chart.MathHelper类 参考

## 静态 Public 成员函数
static double[] | minmax (List< Double > values)
static List< Double > | getLabels (final double start, final double end, final int approxNumLabels)
static float[] | getFloats (List< Float > values)
static double[] | getDoubles (List< Double > values)
static int[] | getInts (List< Integer > values)

## 静态 Public 属性
static final double | NULL_VALUE = Double.MAX_VALUE

## Private 成员函数
| MathHelper ()

## 静态 Private 成员函数
static double[] | computeLabels (final double start, final double end, final int approxNumLabels)
static double | roundUp (final double val)

## 静态 Private 属性
static final NumberFormat | FORMAT = NumberFormat.getNumberInstance()

## 详细描述

Utility class for math operations.

## 构造及析构函数说明

com.ab.view.chart.MathHelper.MathHelper | ( |  | ) |
| inline private

Instantiates a new math helper.

## 成员函数说明

static double [] com.ab.view.chart.MathHelper.computeLabels | ( | final double | start,
|  | final double | end,
|  | final int | approxNumLabels
| ) |  |
| inline static private

Computes a reasonable number of labels for a data range.

参数

  start | start value
  end | final value
  approxNumLabels | desired number of labels

返回
  double[] array containing {start value, end value, increment}

static double [] com.ab.view.chart.MathHelper.getDoubles | ( | List< Double > | values | ) |
| inline static

Transforms a list of Double values into an array of double.

参数

  values | the list of Double

返回
  the array of doubles

static float [] com.ab.view.chart.MathHelper.getFloats | ( | List< Float > | values | ) |
| inline static

Transforms a list of Float values into an array of float.

参数

  values | the list of Float

返回
  the array of floats

static int [] com.ab.view.chart.MathHelper.getInts | ( | List< Integer > | values | ) |
| inline static

Gets the ints.

参数

  values | the values

返回
  the ints

static List<Double> com.ab.view.chart.MathHelper.getLabels | ( | final double | start,
|  | final double | end,
|  | final int | approxNumLabels
| ) |  |
| inline static

Computes a reasonable set of labels for a data interval and number of labels.

参数

  start | start value
  end | final value
  approxNumLabels | desired number of labels

返回
  collection containing {start value, end value, increment}

static double [] com.ab.view.chart.MathHelper.minmax | ( | List< Double > | values | ) |
| inline static

Calculate the minimum and maximum values out of a list of doubles.

参数

  values | the input values

返回
  an array with the minimum and maximum values

static double com.ab.view.chart.MathHelper.roundUp | ( | final double | val | ) |
| inline static private

Given a number, round up to the nearest power of ten times 1, 2, or 5. The argument must be strictly positive.

参数

  val | the val

返回
  the double

## 类成员变量说明

final NumberFormat com.ab.view.chart.MathHelper.FORMAT = NumberFormat.getNumberInstance()
| static private

A number formatter to be used to make sure we have a maximum number of fraction digits in the labels.

final double com.ab.view.chart.MathHelper.NULL_VALUE = Double.MAX_VALUE
| static

A value that is used a null value.

该类的文档由以下文件生成:

- src/com/ab/view/chart/MathHelper.java