Represents a collection of variables in a statistical model.

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

Syntax

Visual Basic (Declaration)
Public Class VariableCollection _
	Inherits Collection(Of Variable) _
	Implements IList, ICollection, IList(Of Variable), ICollection(Of Variable), IEnumerable(Of Variable), IEnumerable
C#
public class VariableCollection : Collection<Variable>, IList, ICollection, IList<Variable>, ICollection<Variable>, IEnumerable<Variable>, IEnumerable
C++
public ref class VariableCollection : public Collection<Variable^>, IList, ICollection, IList<Variable^>, ICollection<Variable^>, IEnumerable<Variable^>, IEnumerable

Methods

IconTypeDescription
Add(Variable)
Adds a Variable to this collection.
AddRange(Variable[]())
Adds a group of variables to this VariableCollection.
AddRange(DataTable, IFormatProvider)
Adds a group of variables to this VariableCollection.
AddRange(DataTable)
Adds a group of variables to this VariableCollection.
AddRange(IDataReader, IFormatProvider)
Adds a group of variables to this VariableCollection.
AddRange(IDataReader)
Adds a group of variables to this VariableCollection.
AddRange(VariableCollection)
Adds a group of variables to the VariableCollection.
Clear()
Removes all elements from the Collection<(Of T>).
ClearItems()
Removes all elements from the Collection<(Of T>).
Clone()
Creates a new VariableCollection that contains the observations of the current VariableCollection that match the current filter.
Contains(T)
Determines whether an element is in the Collection<(Of T>).
ContainsName(String)
Returns a value that indicates whether the VariableCollection contains the specified variable.
CopyTo(T[](), Int32)
Copies the entire Collection<(Of T>) to a compatible one-dimensional Array, starting at the specified index of the target array.
CreateSubset(Filter)
Creates a new VariableCollection that contains the observations of the current VariableCollection that match the specified filter.
CreateSubset(Int32, Int32)
Returns a VariableCollection containing the observations from the current instance in the specified range.
CreateView(Filter)
Constructs a new VariableCollection that represents a view of the observations matching the specified filter.
CreateView(Int32, Int32)
Constructs a new VariableCollection that represents a view of the specified range of observations in the current VariableCollection.
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 iterates through the Collection<(Of T>).
GetHashCode()
Serves as a hash function for a particular type.
GetNames()
Returns a String array containing the names of the variables in the VariableCollection.
GetRow(Object)
Gets the observation values corresponding to the specified key.
GetRow(Int32)
Gets the observation values corresponding to the specified index.
GetType()
Gets the Type of the current instance.
IndexOf(T)
Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<(Of T>).
Insert(Int32, T)
Inserts an element into the Collection<(Of T>) at the specified index.
InsertItem(Int32, T)
Inserts an element into the Collection<(Of T>) at the specified index.
MemberwiseClone()
Creates a shallow copy of the current Object.
Remove(Variable)
RemoveAt(Int32)
Removes the element at the specified index of the Collection<(Of T>).
RemoveItem(Int32)
Removes the element at the specified index of the Collection<(Of T>).
SetItem(Int32, Variable)
Inserts an element into the Collection at the specified index.
Sort(CollectionSortOrder)
Sort the observations in the collection according to the specified sort order.
Sort(String, SortOrder)
Sorts the variable collection by the specified variable.
Sort(String)
Sorts the variable collection by the specified variable.
ToArray()
Returns the variables in the VariableCollection as an array.
ToString()
Returns a String that represents the current Object.

Constructors

IconTypeDescription
VariableCollectionNew()
Constructs a new VariableCollection.
VariableCollectionNew(DataTable, IFormatProvider)
Constructs a new VariableCollection object from a DataTable.
VariableCollectionNew(DataTable)
Constructs a new VariableCollection object from a DataTable.
VariableCollectionNew(IDataReader, IFormatProvider)
Constructs a new VariableCollection from an IDataReader.
VariableCollectionNew(IDataReader)
Constructs a new VariableCollection from an IDataReader.

Properties

IconTypeDescription
ActiveKeyVariable
Gets or sets the variable that acts as a key to the VariableCollection.
Count
Gets the number of elements actually contained in the Collection<(Of T>).
Filter
Gets or sets the Filter for the collection's observations.
IsFixedSize
IsReadOnly
Item(String)
Gets the variable with the specified name from the VariableCollection.
Item(Int32)
Gets the variable at the specified index in the VariableCollection.
Items
Gets a List<(Of T>) wrapper around the Collection<(Of T>).
Observations
Gets the collection of observations.
RowCount
Gets the number of observations of the variables in the VariableCollection.
UnfilteredObservations
Gets the collection of observations without any sorting or filtering applied.

Remarks

Use the VariableCollection class to group one or more variables in a collection. Variable collections are used by statistical model classes to hold the dependent and independent variables.

Variable collections can be created from other VariableCollection objects, arrays of Variable objects, as well as from ADO.NET objects like DataTable and IDataReader objects.

To add or remove variables, use the Add(Variable) and Remove(Variable) methods. You can add multiple variables using the AddRange(Variable[]()) method.

Inheritance Hierarchy

System.Object
  System.Collections.ObjectModel.Collection<(Of T>)<>
    Extreme.Statistics.VariableCollection