Represents a statistical variable.

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

Syntax

Visual Basic (Declaration)
Public MustInherit Class Variable _
	Implements IList, ICollection, IEnumerable, IComparer(Of Integer)
C#
public abstract class Variable : IList, ICollection, IEnumerable, IComparer<int>
C++
public ref class Variable abstract : IList, ICollection, IEnumerable, IComparer<int>

Methods

IconTypeDescription
Aggregate(Int32[]())
Aggregates the values in the variable using the variable's aggregator.
Aggregate(Int32[](), Aggregator)
Aggregates the values in the variable using the specified aggregator.
Clear()
Removes all observations from the variable.
Clone()
Returns a Variable containing a copy of the observations that match the current filter.
Compare(Int32, Int32)
Compares the observations at the specified position.
CreateSubset(Int32, Int32)
Returns a Variable containing a copy of the observations within the specified range.
CreateSubset(Filter)
Returns a Variable containing a copy of the observations that match the specified filter.
CreateView(Filter)
Returns a Variable containing the observations that match the specified filter.
CreateView(Int32, Int32)
Returns a Variable containing the observations within the specified range.
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.
GetEnumerator()
Returns an enumerator that can iterate through the observations of the variable.
GetHashCode()
Serves as a hash function for a particular type.
GetType()
Gets the Type of the current instance.
GetValue(Int32)
Gets the observation at the specified index.
GetValueUnfiltered(Int32)
Gets the observation at the specified index.
Insert(Int32, Object)
Inserts an observation to the variable at the specified index.
IsMissing(Int32)
Returns a value that indicates whether the observation at the specified index is missing.
MemberwiseClone()
Creates a shallow copy of the current Object.
RemoveAt(Int32)
Removes the observation at the specified index.
ResetCalculations()
Performs actions necessary when the variable's data has changed.
Reverse()
Reverses the observations in the variable.
SetValue(Object, Int32)
Sets the observation at the specified index to the specified value.
SetValueUnfiltered(Object, Int32)
Sets the observation at the specified index to the specified value.
Sort()
Sorts the observations in the order specified by the SortOrder property.
Sort(SortOrder)
Sorts the observations in the order specified by the SortOrder property.
ToArray()
Returns all the observations of this variable in an array.
ToCategoricalVariable()
Converts the variable to a CategoricalVariable.
ToString()
Returns a String that represents the current Object.

Fields

IconTypeDescription
static memberDefaultKeyName
Gets the default value for a KeyVariable when no name is provided.

Constructors

IconTypeDescription
VariableNew(String)
Constructs a new Variable object.

Properties

IconTypeDescription
Aggregator
Gets or sets the Aggregator for this NumericalVariable.
Filter
Gets or sets the Filter associated with the current variable.
IsSortable
Gets a value that indicates whether the observations can be sorted.
IsSorted
Gets a value that indicates whether the observations have been sorted in the order specified by the SortOrder property.
Length
Gets the number of observations of the Variable.
MissingValue
Gets or sets the value used to indicate an observation is missing.
Name
Gets or sets the name of this Variable.
SortOrder
Gets or sets the order in which observations should be sorted.
UnfilteredLength
Gets the total number of observations of the Variable ignoring any active filter.
VariableCollection
Gets the VariableCollection that contains this variable.

Remarks

The Variable class is the base class for all classes that implement statistical variables.

Variable is an abstract base class and cannot be instantiated directly. Instead, instantiate one of its derived classes, as listed in the table below.

ClassDescriptionCategoricalVariableRepresents a variable whose observations can take on a discrete set of values.DateTimeVariableRepresents a variable whose observations are DateTime values.NumericalVariableRepresents a variable whose observations are numerical in nature.KeyVariableRepresents a variable with unique observations that can act as row keys in a VariableCollection.

Note to inheritors: When you inherit from Variable, you must override the Length property, and the GetEnumerator(), GetValue(Int32) and ToCategoricalVariable() methods.

Inheritance Hierarchy

System.Object
  Extreme.Statistics.Variable