Sign in Join
FPDoc Onlineexperiment

TAggregateAvg.UpdateAggregate procedure

Member of TAggregateAvgpublicIn unit fpExprPars

Update average aggregate with new value

Declaration

pascal
procedure UpdateAggregate; override

Description

The UpdateAggregate method processes a new value for the average calculation by updating both the running sum and incrementing the count of processed values. It leverages the parent TAggregateSum.UpdateAggregate for sum handling.

Each call to this method adds one value to the sum and increases the count by one, maintaining the data needed to calculate the final average when requested.

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