Represents a method that aggregates data in a variable.

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public MustInherit Class Aggregator
C#
public abstract class Aggregator
C++
public ref class Aggregator abstract

Methods

IconTypeDescription
Apply(Variable, Int32, Int32)
Applies the aggregator to a range of observations of a variable.
Apply(Variable, Int32[]())
Applies the aggregator to a variable and returns the result as a variable.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
Finalize()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GetHashCode()
Serves as a hash function for a particular type.
GetType()
Gets the Type of the current instance.
MemberwiseClone()
Creates a shallow copy of the current Object.
static memberNth(Int32)
Gets an aggregator that returns the observation at the specified position.
ToString()
Returns a String that represents the current Object.
static memberWeightedAverage(NumericalVariable)
Returns an aggregator that uses observations from another variable to compute a weighted average.

Fields

IconTypeDescription
static memberAverage
Gets an aggregator that returns the average of the observations.
static memberCount
Gets an aggregator that returns the number of observations.
static memberFirst
Gets an aggregator that returns the first observation.
static memberLast
Gets an aggregator that returns the last observation.
static memberMaximum
Gets an aggregator that returns the largest observation.
static memberMinimum
Gets an aggregator that returns the smallest observation.
static memberStandardDeviation
Gets an aggregator that returns the average of the observations.
static memberSum
Gets an aggregator that returns the sum of the observations.
static memberVariance
Gets an aggregator that returns the average of the observations.

Constructors

IconTypeDescription
AggregatorNew(Type)
Constructs a new aggregator.
AggregatorNew()
Constructs a new aggregator.

Remarks

Use the Aggregator class to aggregate the observations in a Variable. The Apply(Variable, Int32, Int32) method has two overloads. The first overload aggregates the observations of a variable over a specified interval and returns the result. The second overload aggregates the observations over intervals with the specified boundaries, and returns the results in a new variable.

A number of aggregators have been predefined. These are exposed as staticSharedstatic fields and methods of the Aggregator class. These include aggregators that return the first, last, smallest and largest observation in an interval, as well as sums, averages, and other summary statistics.

To define a custom aggregator, create a class that inherits from Aggregator and overrides the Apply(Variable, Int32, Int32) method. In the class constructor, you should call the base constructor with one argument: the type of variable returned by the aggregator.

Inheritance Hierarchy

System.Object
  Extreme.Statistics.Aggregator