public sealed class DoubleMatrixRowCollection : ReadOnlyObservableCollection<DoubleMatrixRow>Public NotInheritable Class DoubleMatrixRowCollection
Inherits ReadOnlyObservableCollection(Of DoubleMatrixRow)public ref class DoubleMatrixRowCollection sealed : public ReadOnlyObservableCollection<DoubleMatrixRow^>[<SealedAttribute>]
type DoubleMatrixRowCollection =
class
inherit ReadOnlyObservableCollection<DoubleMatrixRow>
endInstantiation
You cannot directly instantiate a DoubleMatrixRowCollection. Instead, the collection of all rows in a DoubleMatrix instance can be obtained by calling AsRowCollection, or you can collect rows having specific indexes by calling AsRowCollection(IndexCollection). Such methods return a DoubleMatrixRowCollection object, whose items have type DoubleMatrixRow.
In the following example, the rows of a matrix are enumerated.
using System;
namespace Novacta.Analytics.CodeExamples
{
public class RowsEnumeratorExample0
{
public void Main()
{
// Create a matrix.
var data = new double[12] {
1, 5, 9,
2, 6, 10,
3, 7, 11,
4, 8, 12
};
var matrix = DoubleMatrix.Dense(4, 3, data, StorageOrder.RowMajor);
Console.WriteLine("Data matrix:");
Console.WriteLine(matrix);
Console.WriteLine();
// Get the collection of matrix rows.
var rows = matrix.AsRowCollection();
// Enumerate matrix rows.
foreach (var row in rows) {
Console.WriteLine("Row {0}: ", row.Index);
Console.WriteLine(row);
}
}
}
}
// Executing method Main() produces the following output:
//
// Data matrix:
// 1 5 9
// 2 6 10
// 3 7 11
// 4 8 12
//
//
//
// Row 0:
// 1 5 9
// Row 1:
// 2 6 10
// Row 2:
// 3 7 11
// Row 3:
// 4 8 12| Count | Gets the number of elements contained in the ReadOnlyCollectionT instance. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| Item | Gets the element at the specified index. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| Items | Returns the IListT that the ReadOnlyCollectionT wraps. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| Matrix | Gets the Matrix whose rows this instance collects. |
| XDataColumn | Gets or sets the column index of the entries which are to be returned by the XData property of the rows in the collection. |
| YDataColumn | Gets or sets the column index of the entries which are to be returned by the YData property of the rows in the collection. |
| ZDataColumn | Gets or sets the column index of the entries which are to be returned by the ZData property of the rows in the collection. |
| Contains | Determines whether an element is in the ReadOnlyCollectionT. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| CopyTo | Copies the entire ReadOnlyCollectionT to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetEnumerator | Returns an enumerator that iterates through the ReadOnlyCollectionT. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| IndexOf | Searches for the specified object and returns the zero-based index of the first occurrence within the entire ReadOnlyCollectionT. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| OnCollectionChanged | Raises the CollectionChanged event using the provided arguments. (Inherited from ReadOnlyObservableCollectionDoubleMatrixRow) |
| OnPropertyChanged | Raises the PropertyChanged event using the provided arguments. (Inherited from ReadOnlyObservableCollectionDoubleMatrixRow) |
| ToDoubleMatrix | Converts from DoubleMatrixRowCollection to DoubleMatrix. |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| CollectionChanged | Occurs when an item is added or removed. (Inherited from ReadOnlyObservableCollectionDoubleMatrixRow) |
| PropertyChanged | Occurs when a property value changes. (Inherited from ReadOnlyObservableCollectionDoubleMatrixRow) |
| (DoubleMatrixRowCollection to DoubleMatrix) | Performs an implicit conversion from DoubleMatrixRowCollection to DoubleMatrix. |
| ICollectionTAdd | Adds an item to the ICollectionT. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListAdd | Adds an item to the IList. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| ICollectionTClear | Removes all items from the ICollectionT. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListClear | Removes all items from the IList. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| INotifyCollectionChangedCollectionChanged | Occurs when the collection changes. (Inherited from ReadOnlyObservableCollectionDoubleMatrixRow) |
| IListContains | Determines whether the IList contains a specific value. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| ICollectionCopyTo | Copies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IEnumerableGetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListIndexOf | Determines the index of a specific item in the IList. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListTInsert | Inserts an item to the IListT at the specified index. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListInsert | Inserts an item to the IList at the specified index. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListIsFixedSize | Gets a value indicating whether the IList has a fixed size. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| ICollectionTIsReadOnly | Gets a value indicating whether the ICollectionT is read-only. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListIsReadOnly | Gets a value indicating whether the IList is read-only. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| ICollectionIsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListTItem | Gets the element at the specified index. An NotSupportedException occurs if you try to set the item at the specified index. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListItem | Gets the element at the specified index. A NotSupportedException occurs if you try to set the item at the specified index. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| INotifyPropertyChangedPropertyChanged | Occurs when a property value changes. (Inherited from ReadOnlyObservableCollectionDoubleMatrixRow) |
| ICollectionTRemove | Removes the first occurrence of a specific object from the ICollectionT. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListRemove | Removes the first occurrence of a specific object from the IList. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListTRemoveAt | Removes the IListT item at the specified index. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| IListRemoveAt | Removes the IList item at the specified index. This implementation always throws NotSupportedException. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |
| ICollectionSyncRoot | Gets an object that can be used to synchronize access to the ICollection. (Inherited from ReadOnlyCollectionDoubleMatrixRow) |