Click or drag to resize

DoubleMatrixRowCollection Class

Represents a collection of rows from a DoubleMatrix.
Inheritance Hierarchy
SystemObject
  System.Collections.ObjectModelReadOnlyCollectionDoubleMatrixRow
    System.Collections.ObjectModelReadOnlyObservableCollectionDoubleMatrixRow
      Novacta.AnalyticsDoubleMatrixRowCollection

Namespace:  Novacta.Analytics
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
public sealed class DoubleMatrixRowCollection : ReadOnlyObservableCollection<DoubleMatrixRow>

The DoubleMatrixRowCollection type exposes the following members.

Properties
  NameDescription
Public propertyCount (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Public propertyItem
Gets the element at the specified index.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Protected propertyItems (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Public propertyMatrix
Gets the Matrix whose rows this instance collects.
Public propertyCode exampleXDataColumn
Gets or sets the column index of the entries which are to be returned by the XData property of the rows in the collection.
Public propertyCode exampleYDataColumn
Gets or sets the column index of the entries which are to be returned by the YData property of the rows in the collection.
Public propertyCode exampleZDataColumn
Gets or sets the column index of the entries which are to be returned by the ZData property of the rows in the collection.
Top
Methods
  NameDescription
Public methodContains (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Public methodCopyTo (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnCollectionChanged
Raises the CollectionChanged event using the provided arguments.
(Inherited from ReadOnlyObservableCollectionDoubleMatrixRow.)
Protected methodOnPropertyChanged
Raises the PropertyChanged event using the provided arguments.
(Inherited from ReadOnlyObservableCollectionDoubleMatrixRow.)
Public methodStatic memberToDoubleMatrix
Converts from DoubleMatrixRowCollection to DoubleMatrix.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Protected eventCollectionChanged
Occurs when an item is added or removed.
(Inherited from ReadOnlyObservableCollectionDoubleMatrixRow.)
Protected eventPropertyChanged
Occurs when a property value changes.
(Inherited from ReadOnlyObservableCollectionDoubleMatrixRow.)
Top
Operators
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodICollectionTAdd (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListAdd
Adds an item to the IList. This implementation always throws NotSupportedException.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodICollectionTClear (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListClear
Removes all items from the IList. This implementation always throws NotSupportedException.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate eventINotifyCollectionChangedCollectionChanged
Occurs when the collection changes.
(Inherited from ReadOnlyObservableCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListContains
Determines whether the IList contains a specific value.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodICollectionCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIEnumerableGetEnumerator
Returns an enumerator that iterates through a collection.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListIndexOf
Determines the index of a specific item in the IList.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListTInsert (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListInsert
Inserts an item to the IList at the specified index. This implementation always throws NotSupportedException.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate propertyIListIsFixedSize
Gets a value indicating whether the IList has a fixed size.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate propertyICollectionTIsReadOnly (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate propertyIListIsReadOnly
Gets a value indicating whether the IList is read-only.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate propertyICollectionIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate propertyIListTItem
Gets the element at the specified index. An NotSupportedException occurs if you try to set the item at the specified index.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate propertyIListItem
Gets the element at the specified index. A NotSupportedException occurs if you try to set the item at the specified index.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate eventINotifyPropertyChangedPropertyChanged
Occurs when a property value changes.
(Inherited from ReadOnlyObservableCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodICollectionTRemove (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListRemove
Removes the first occurrence of a specific object from the IList. This implementation always throws NotSupportedException.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListTRemoveAt (Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate methodIListRemoveAt
Removes the IList item at the specified index. This implementation always throws NotSupportedException.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Explicit interface implementationPrivate propertyICollectionSyncRoot
Gets an object that can be used to synchronize access to the ICollection.
(Inherited from ReadOnlyCollectionDoubleMatrixRow.)
Top
Remarks

Instantiation

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.

Examples

In the following example, the rows of a matrix are enumerated.

C#
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

See Also