uk.ac.starlink.ttools.func
Class Arrays

java.lang.Object
  extended by uk.ac.starlink.ttools.func.Arrays

public class Arrays
extends Object

Functions which operate on array-valued cells. You can only use these functions on values which are already arrays. In most cases that means on values in table columns which are declared as array-valued. FITS and VOTable tables can have columns which contain array values, but other formats such as CSV cannot.

Since:
14 Jul 2008
Author:
Mark Taylor

Method Summary
static double maximum(Object array)
          Returns the largest of the non-blank elements in the array.
static double mean(Object array)
          Returns the mean of all the non-blank elements in the array.
static double minimum(Object array)
          Returns the smallest of the non-blank elements in the array.
static int size(Object array)
          Returns the number of elements in the array.
static double sum(Object array)
          Returns the sum of all the non-blank elements in the array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sum

public static double sum(Object array)
Returns the sum of all the non-blank elements in the array. If array is not a numeric array, null is returned.

Parameters:
array - array of numbers
Returns:
sum of all the numeric values in array

mean

public static double mean(Object array)
Returns the mean of all the non-blank elements in the array. If array is not a numeric array, null is returned.

Parameters:
array - array of numbers
Returns:
mean of all the numeric values in array

minimum

public static double minimum(Object array)
Returns the smallest of the non-blank elements in the array. If array is not a numeric array, null is returned.

Parameters:
array - array of numbers
Returns:
minimum of the numeric values in array

maximum

public static double maximum(Object array)
Returns the largest of the non-blank elements in the array. If array is not a numeric array, null is returned.

Parameters:
array - array of numbers
Returns:
maximum of the numeric values in array

size

public static int size(Object array)
Returns the number of elements in the array. If array is not an array, zero is returned.

Parameters:
array - array
Returns:
size of array


Copyright © 2009 Central Laboratory of the Research Councils. All Rights Reserved.