Unit 'fpexprpars' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TAggregateAvg

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internally used class for average aggregate functions

Declaration

Source position: fpexprpars.pp line 685

type TAggregateAvg = class(TAggregateSum)

public

  procedure InitAggregate; override;

  

Initialize average aggregation

  procedure UpdateAggregate; override;

  

Update average aggregate with new value

  procedure GetNodeValue(); override;

  

Calculate the average from aggregated values

end;

Inheritance

TAggregateAvg

  

Internally used class for average aggregate functions

|

TAggregateSum

  

Internally used class for sum aggregate functions

|

TAggregateExpr

  

Internally used Base class for aggregate expressions

|

TFPExprFunction

  

Internally used class for representing function calls in expression trees

|

TFPExprIdentifierNode

  

Internally used class for identifier nodes in expression trees

|

TFPExprNode

  

Class for representing nodes in expression trees

|

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

TFPExprNode

  

Class for representing nodes in expression trees


Documentation generated on: Dec 15 2025