IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Meta.Numerics.Matrices.AnyMatrix< T > Class Template Reference

Describes the form of all matrices. More...

+ Inheritance diagram for Meta.Numerics.Matrices.AnyMatrix< T >:

Public Member Functions

virtual void Fill (Func< int, int, T > f)
 Sets all matrix entries according to a supplied fill function. More...
 
virtual T[,] ToArray ()
 Copies the matrix into an array. More...
 

Protected Member Functions

 AnyMatrix ()
 

Properties

abstract int RowCount [get]
 Gets the number of matrix rows. More...
 
abstract int ColumnCount [get]
 Gets the number of matrix columns. More...
 
abstract T this[int r, int c] [get, set]
 Gets or sets the value of a matrix entry. More...
 
bool IsReadOnly [get, set]
 Gets a flag indicating whether the matrix is read-only. More...
 

Private Attributes

bool isReadOnly = false
 

Detailed Description

Describes the form of all matrices.

Template Parameters
TThe type of the matrix entries.

Constructor & Destructor Documentation

Meta.Numerics.Matrices.AnyMatrix< T >.AnyMatrix ( )
inlineprotected

Member Function Documentation

virtual void Meta.Numerics.Matrices.AnyMatrix< T >.Fill ( Func< int, int, T >  f)
inlinevirtual

Sets all matrix entries according to a supplied fill function.

Parameters
fThe fill function.

Referenced by Test.MultiExtremumTest.Vardim().

virtual T [,] Meta.Numerics.Matrices.AnyMatrix< T >.ToArray ( )
inlinevirtual

Copies the matrix into an array.

Returns
A two-dimensional .NET array containing the matrix entries.

The output array is independent of the matrix. Changes to its elements will not change the elements of the matrix, and changes to the matrix elements will not be reflected in the array.

Reimplemented in Meta.Numerics.Matrices.VectorBase.

Referenced by Test.RectangularMatrixTest.MatrixArrayConversion().

Member Data Documentation

bool Meta.Numerics.Matrices.AnyMatrix< T >.isReadOnly = false
private

Property Documentation

abstract T Meta.Numerics.Matrices.AnyMatrix< T >.this[int r, int c]
getset

Gets or sets the value of a matrix entry.

Parameters
rThe (zero-based) row index.
cThe (zero-based) column index.
Returns
The value of the r ,c matrix entry.
Exceptions
ArgumentOutOfRangeExceptionr or c is outside the valid range.
bool Meta.Numerics.Matrices.AnyMatrix< T >.IsReadOnly
getset

Gets a flag indicating whether the matrix is read-only.

Although you can't change the values in a read-only matrix, you can make a writable copy of it.


The documentation for this class was generated from the following file: