%ZEN.Report.Aggregate.Median
class %ZEN.Report.Aggregate.Median extends %ZEN.Report.CustomAggregate
Aggregate for the median of a set of numerical data. The median is a number with half of the data set of greater value than it, and half of lesser value. For a data set with an odd size, the median is a member of the data set. For a data set with an even size, the median is half-way between two members of the data set.Property Inventory (Including Private)
Method Inventory (Including Private)
Properties (Including Private)
property Count as %Integer [ InitialExpression = 0 ];
Number of values processed
Property methods: CountDisplayToLogical(), CountGet(), CountIsValid(), CountLogicalToDisplay(), CountNormalize(), CountSet(), CountXSDToLogical()
property Values as array of %Integer;
Array of processed values
Property methods: ValuesBuildValueArray(), ValuesCollectionToDisplay(), ValuesCollectionToOdbc(), ValuesDisplayToCollection(), ValuesDisplayToLogical(), ValuesGet(), ValuesGetObject(), ValuesGetObjectId(), ValuesGetSwizzled(), ValuesIsValid(), ValuesLogicalToDisplay(), ValuesNormalize(), ValuesOdbcToCollection(), ValuesSet(), ValuesSetObject(), ValuesSetObjectId(), ValuesXSDToLogical()
Methods (Including Private)
method GetResult() as %String
Returns the median. Returns "" for an empty data set.
Uses a divide and conquer selection algorithm.
Processes each new value.
private method partition(left, right, pivotIndex)
Finds the partition point
private method select(k, left, right)
Select's the kth smallest element in Values
private method swap(x, y)
Inherited Members
Inherited Properties (Including Private)
- accumIf
- class
- escape
- excelFormula
- excelName
- excelNumberFormat
- expression
- field
- fields
- filter
- format
- ignoreNLS
- name
- postprocessResult
- preprocessValue
- runtimeMode
- type
- uniqueId
Inherited Methods (Including Private)
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %ConstructCloneInit()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnAddToSaveSet()
- %OnClose()
- %OnConstructClone()
- %OnNew()
- %OnValidateObject()
- %OriginalNamespace()
- %PackageName()
- %PostProcessValue()
- %PreProcessValue()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLImportAttributes()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
- fieldIsValid()
- nameIsValid()