ERXArrayUtilities.StandardDeviationOperator Class Reference

List of all members.

Public Member Functions

Object compute (NSArray<?> array, String keypath)
 StandardDeviationOperator (boolean isPopulation)

Private Attributes

boolean isPop


Detailed Description

Define an NSArray.Operator for the key stdDev and popStdDev.

This allows for key value paths like:
All three of these examples will return the same value, which in this case is the standard deviation of the amounts. The standard deviation is a measure of the dispersion of a sample of numbers. The population standard deviation is used if you have the values for an entire population.

The standard deviation operator applies to the array of objects to its left if it is the last key in the path. Otherwise it applies to the end of the keypath to its right. It should not be followed by an array or any other array operators. This is because it does not call valueForKeyPath on the array to its left, but instead loops through the values of the array to its left, calling valueForKeyPath on the individual array values instead. This behavior is consistent with Apple's standard NSArray operators.

Constructor & Destructor Documentation

StandardDeviationOperator ( boolean  isPopulation  ) 


Member Function Documentation

Object compute ( NSArray<?>  array,
String  keypath 
)

returns the standard deviation value for the values of the keypath.

Parameters:
array array to be checked.
keypath path to numeric values
Returns:
standard deviation value


Member Data Documentation

boolean isPop [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:12 2012 for Project Wonder by  doxygen 1.5.8