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
| Icon | Type | Description |
|---|---|---|
| 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) | ||
| Finalize() | ||
| 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() |
Fields
| Icon | Type | Description |
|---|---|---|
| DefaultKeyName |
Gets the default value for a KeyVariable when no name is provided.
|
Constructors
| Icon | Type | Description |
|---|---|---|
| VariableNew(String) |
Constructs a new Variable object.
|
Properties
| Icon | Type | Description |
|---|---|---|
| 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.