Sign in Join
FPDoc Onlineexperiment

TAggregateAvg class

In unit fpExprPars

Internally used class for average aggregate functions

Declaration

pascal
TAggregateAvg = class(TAggregateSum)

Inheritance

  1. TAggregateAvg
  2. TAggregateSum
  3. TAggregateExpr
  4. TFPExprFunction
  5. TFPExprIdentifierNode
  6. TFPExprNode
  7. TObject

Description

The TAggregateAvg class implements the average (mean) aggregate function, which calculates the arithmetic mean of all processed numeric values. It extends TAggregateSum to leverage summation functionality while adding count tracking for average calculation.

The average function handles different numeric types and ensures appropriate precision in the final result. Division by zero is handled appropriately when no values have been processed.

This class is used internally by the TFPExpressionParser class to construct an AST (Abstract Syntax Tree). There is normally no need for you to use or instantiate this class directly.

See also

Methods

InitAggregatepublicInitialize average aggregation
UpdateAggregatepublicUpdate average aggregate with new value
GetNodeValuepublicCalculate the average from aggregated values

Fields

FCountprotected

Inherited

From TAggregateSum (1)

ConvertArgument

From TAggregateExpr (1)

IsAggregate

From TFPExprFunction (8)

ArgumentNodes ArgumentParams AsString CalcParams Check CreateFunction Destroy HasAggregate

From TFPExprIdentifierNode (3)

CreateIdentifier Identifier NodeType

From TFPExprNode (2)

CheckNodeType NodeValue

From TObject (41)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.