Packageflare.query
Classpublic class Variance
InheritanceVariance Inheritance AggregateExpression Inheritance Expression

Aggregate operator for computing variance or standard deviation.



Public Properties
 PropertyDefined by
 Inheritedinput : Expression
The sub-expression to aggregate.
AggregateExpression
 InheritednumChildren : int
The number of sub-expressions that are children of this expression.
AggregateExpression
Protected Properties
 PropertyDefined by
 Inherited_expr : Expression
The sub-expression to aggregate.
AggregateExpression
Public Methods
 MethodDefined by
  
Variance(input:*, type:int = 0)
Creates a new Variance operator.
Variance
  
aggregate(value:Object):void
Increments the aggregation computation to include the input value.
Variance
 Inherited
Creates a cloned copy of the expression.
Expression
  
eval(o:Object = null):*
Evaluates this expression with the given input object.
Variance
 Inherited
[static] Utility method that maps an input value into an Expression.
Expression
 Inherited
Returns the sub-expression at the given index.
AggregateExpression
 Inherited
predicate(o:Object):Boolean
Boolean predicate that tests the output of evaluating this expression.
Expression
  
reset():void
Resets the aggregation computation.
Variance
 Inherited
setChildAt(idx:int, expr:Expression):Boolean
Set the sub-expression at the given index.
AggregateExpression
 Inherited
toString():String
Returns a string representation of the expression.
Expression
 Inherited
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all sub-expressions.
Expression
Public Constants
 ConstantDefined by
  DEVIATION : int = 1
[static] Flag indicating the standard deviation should be computed.
Variance
  POPULATION : int = 0
[static] Flag indicating the population variance or deviation.
Variance
  SAMPLE : int = 2
[static] Flag indicating the sample variance or deviation.
Variance
  VARIANCE : int = 0
[static] Flag indicating the variance should be computed.
Variance
Constructor detail
Variance()constructor
public function Variance(input:*, type:int = 0)

Creates a new Variance operator. By default, the population variance is computed. Use the type flags to change this. For example, the type argument Variance.SAMPLE | Variance.DEVIATION results in the sample standard deviation being computed.

Parameters
input:* — the sub-expression of which to compute variance
 
type:int (default = 0) — the type of variance or deviation to compute
Method detail
aggregate()method
public override function aggregate(value:Object):void

Increments the aggregation computation to include the input value.

Parameters
value:Object — a value to include within the aggregation.
eval()method 
public override function eval(o:Object = null):*

Evaluates this expression with the given input object.

Parameters
o:Object (default = null) — the input object to this expression

Returns
* — the result of evaluating the expression
reset()method 
public override function reset():void

Resets the aggregation computation.

Constant detail
DEVIATIONconstant
public static const DEVIATION:int = 1

Flag indicating the standard deviation should be computed.

POPULATIONconstant 
public static const POPULATION:int = 0

Flag indicating the population variance or deviation.

SAMPLEconstant 
public static const SAMPLE:int = 2

Flag indicating the sample variance or deviation.

VARIANCEconstant 
public static const VARIANCE:int = 0

Flag indicating the variance should be computed.