IDS peak ICV v1.6.0
Loading...
Searching...
No Matches
Matrix< T > Class Template Reference
Inheritance diagram for Matrix< T >:

Public Member Functions

 Matrix (uint rows, uint columns)
 Initializes a new instance of the Matrix<T> class with the specified dimensions.
 
 Matrix (uint rows, uint columns, T[,] data)
 Initializes a new instance of the Matrix<T> class with given values.
 
 Matrix (uint rows, uint columns, T[] data)
 Initializes a new instance of the Matrix<T> class with given values.
 
IEnumerator< T > GetEnumerator ()
 
override int GetHashCode ()
 Computes a hash code based on all elements in the matrix.
 
override string ToString ()
 Returns a string representation of the matrix.
 

Static Public Member Functions

static Matrix< T > Diagonal (uint size, T value)
 Creates a diagonal matrix with the given value on the diagonal.
 
static Matrix< T > Identity (uint size)
 Creates an identity matrix of given size.
 

Properties

uint Rows [get]
 Number of rows in the matrix.
 
uint Columns [get]
 Number of columns in the matrix.
 
T this[uint row, uint col] [get, set]
 Gets or sets the element at the specified row and column.
 
static IEqualityComparer< Matrix< T > > Comparer = new MatrixEqualityComparer() [get]
 Gets a default equality comparer for comparing Matrix<T> data values.
 

Detailed Description

Represents a generic 2D matrix of elements with a specified number of rows and columns.

Provides utilities such as creating diagonal or identity matrices and converting to a flat array.

Template Parameters
TThe type of the elements stored in the matrix.
Since
IDSImaging.Peak.ICV 1.3

Constructor & Destructor Documentation

◆ Matrix() [1/3]

Matrix ( uint rows,
uint columns )
inline

Initializes a new instance of the Matrix<T> class with the specified dimensions.

All elements are initialized to the default value of T .

Parameters
rowsNumber of rows.
columnsNumber of columns.
Since
IDSImaging.Peak.ICV 1.3

◆ Matrix() [2/3]

Matrix ( uint rows,
uint columns,
T data[,] )
inline

Initializes a new instance of the Matrix<T> class with given values.

Parameters
rowsNumber of rows.
columnsNumber of columns.
data2D Array in row-major order.
Since
IDSImaging.Peak.ICV 1.3

◆ Matrix() [3/3]

Matrix ( uint rows,
uint columns,
T[] data )
inline

Initializes a new instance of the Matrix<T> class with given values.

Parameters
rowsNumber of rows.
columnsNumber of columns.
dataFlat array of size rows * columns in row-major order.
Since
IDSImaging.Peak.ICV 1.3

Member Function Documentation

◆ Diagonal()

static Matrix< T > Diagonal ( uint size,
T value )
inlinestatic

Creates a diagonal matrix with the given value on the diagonal.

Since
IDSImaging.Peak.ICV 1.3

◆ GetEnumerator()

IEnumerator< T > GetEnumerator ( )
inline

◆ GetHashCode()

override int GetHashCode ( )
inline

Computes a hash code based on all elements in the matrix.

Since
IDSImaging.Peak.ICV 1.3

◆ Identity()

static Matrix< T > Identity ( uint size)
inlinestatic

Creates an identity matrix of given size.

Since
IDSImaging.Peak.ICV 1.3

◆ ToString()

override string ToString ( )
inline

Returns a string representation of the matrix.

Since
IDSImaging.Peak.ICV 1.3

Property Documentation

◆ Columns

uint Columns
get

Number of columns in the matrix.

Since
IDSImaging.Peak.ICV 1.3

◆ Comparer

IEqualityComparer<Matrix<T> > Comparer = new MatrixEqualityComparer()
staticget

Gets a default equality comparer for comparing Matrix<T> data values.

Since
IDSImaging.Peak.ICV 1.3

◆ Rows

uint Rows
get

Number of rows in the matrix.

Since
IDSImaging.Peak.ICV 1.3

◆ this[uint row, uint col]

T this[uint row, uint col]
getset

Gets or sets the element at the specified row and column.

Since
IDSImaging.Peak.ICV 1.3