Matrix<T>.Item Property

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Item[Func<T, Boolean>, Int32] Gets or sets the elements of a column of the matrix that meet the specified condition.
Item[IEnumerable<Int32>, Range] Gets or sets the elements of a matrix with the specified row indexes and column range.
Item[IEnumerable<Int32>, IEnumerable<Int32>] Gets or sets the elements of a matrix with the specified row and column indexes.
Item[IEnumerable<Int32>, Int32] Gets or sets the elements of a column with the specified indexes.
Item[IEnumerable<Int32>, Range] Gets or sets the elements of a matrix with the specified row indexes and column range.
Item[Index, Index] Gets or sets the specified element in this matrix.
Item[Index, Range] Gets or sets the elements of a row of this matrix.
Item[Int32, Range] Gets or sets the elements of a row of this matrix.
Item[Int32, Vector<Boolean>] Gets or sets the elements of a row of this matrix.
Item[Int32, IEnumerable<Int32>] Gets or sets the elements of a row with the specified indexes.
Item[Int32, Func<T, Boolean>] Gets or sets the elements of a row of the matrix that meet the specified condition.
Item[Int32, Int32] Gets or sets the specified element in this matrix.
Item[Range, Range] Gets or sets the elements of a sub-matrix of this matrix.
Item[Range, IEnumerable<Int32>] Gets or sets the elements of a matrix with the specified row range and column indexes.
Item[Range, Int32] Gets or sets the elements of a column of this matrix.
Item[Range, IEnumerable<Int32>] Gets or sets the elements of a matrix with the specified row range and column indexes.
Item[Range, Index] Gets or sets the elements of a column of this matrix.
Item[Range, Range] Gets or sets the elements of a sub-matrix of this matrix.
Item[Vector<Boolean>, Int32] Gets or sets the elements of a column of this matrix.

Item(Func<T, Boolean>, Int32)

Gets or sets the elements of a column of the matrix that meet the specified condition.
C#
public Vector<T> this[
	Func<T, bool> condition,
	int column
] { get; set; }

Parameters

condition  Func<T, Boolean>
A delegate that represents a predicate that specifies the condition to test.
column  Int32
The zero-based index of the column.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a column of this matrix.

Getting the value of this property returns a new vector with the elements for which condition is true. Setting the value of this property sets the selected elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of value does not equal the number of elements for which condition is true.

Item(IEnumerable<Int32>, Range)

Gets or sets the elements of a matrix with the specified row indexes and column range.
C#
public Matrix<T> this[
	IEnumerable<int> rowIndexes,
	Range columnRange
] { get; set; }

Parameters

rowIndexes  IEnumerable<Int32>
A sequence of integers.
columnRange  Range
A Range value that specifies the range of elements that are to make up the new vector.

Property Value

Matrix<T>
A Matrix<T> that contains the elements of the matrix with row indexes in rowIndexes and column indexes in columnRange.

Item(IEnumerable<Int32>, IEnumerable<Int32>)

Gets or sets the elements of a matrix with the specified row and column indexes.
C#
public Matrix<T> this[
	IEnumerable<int> rowIndexes,
	IEnumerable<int> columnIndexes
] { get; set; }

Parameters

rowIndexes  IEnumerable<Int32>
A sequence of integers.
columnIndexes  IEnumerable<Int32>
A sequence of integers.

Property Value

Matrix<T>
A Matrix<T> that contains the elements of the matrix with row indexes in rowIndexes and column indexes in columnIndexes.

Item(IEnumerable<Int32>, Int32)

Gets or sets the elements of a column with the specified indexes.
C#
public Vector<T> this[
	IEnumerable<int> rowIndexes,
	int column
] { get; set; }

Parameters

rowIndexes  IEnumerable<Int32>
A sequence of integers.
column  Int32
The zero-based index of the column.

Return Value

Vector<T>
A Vector<T> containing a sequence of elements of the column with index column of this instance whose index is the corresponding value in rowIndexes.

Exceptions

ArgumentNullExceptionrowIndexes is null.
ArgumentOutOfRangeExceptioncolumn is less than zero or greater than or equal to the number of rows in the matrix.
ArgumentException One or more of the elements of rowIndexes is less than zero or greater than or equal to the length of the vector.
DimensionMismatchExceptionThe length of value does not equal the number of elements in rowIndexes.

Item(IEnumerable<Int32>, Range)

Gets or sets the elements of a matrix with the specified row indexes and column range.
C#
public Matrix<T> this[
	IEnumerable<int> rowIndexes,
	Range columnRange
] { get; set; }

Parameters

rowIndexes  IEnumerable<Int32>
A sequence of integers.
columnRange  Range
A Range value that specifies the range of elements that are to make up the new vector.

Property Value

Matrix<T>
A Matrix<T> that contains the elements of the matrix with row indexes in rowIndexes and column indexes in columnRange.

Item(Index, Index)

Gets or sets the specified element in this matrix.
C#
public T this[
	Index row,
	Index column
] { get; set; }

Parameters

row  Index
The zero-based row index of the element to get or set.
column  Index
The zero-based column index of the element to get or set.

Property Value

T
The element of the Matrix<T> in the columnth column of the rowth row.

Exceptions

ArgumentOutOfRangeExceptioncolumn is less than zero or greater than or equal to the number of columns in this Matrix<T>. Or, row is less than zero or greater than or equal to the number of rows in this instance.

Item(Index, Range)

Gets or sets the elements of a row of this matrix.
C#
public Vector<T> this[
	Index row,
	Range columnRange
] { get; set; }

Parameters

row  Index
The zero-based index of the row.
columnRange  Range
A Range value that specifies the range of elements in the row.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this instance.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of the range specified by columnRange does not equal the length of value.

Item(Int32, Range)

Gets or sets the elements of a row of this matrix.
C#
public Vector<T> this[
	int row,
	Range columnRange
] { get; set; }

Parameters

row  Int32
The zero-based index of the row.
columnRange  Range
The zero-based index of the column containing the first element in the row vector.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this instance.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of the range specified by columnRange does not equal the length of value.

Item(Int32, Vector<Boolean>)

Gets or sets the elements of a row of this matrix.
C#
public Vector<T> this[
	int row,
	Vector<bool> mask
] { get; set; }

Parameters

row  Int32
The zero-based index of the row.
mask  Vector<Boolean>
A boolean vector that specifies the elements to select.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this matrix.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of value does not equal the number of true elements of mask.

Item(Int32, IEnumerable<Int32>)

Gets or sets the elements of a row with the specified indexes.
C#
public Vector<T> this[
	int row,
	IEnumerable<int> columnIndexes
] { get; set; }

Parameters

row  Int32
The zero-based index of the row.
columnIndexes  IEnumerable<Int32>
A sequence of integers.

Return Value

Vector<T>
A Vector<T> containing a sequence of elements of the row with index row of this instance whose index is the corresponding value in columnIndexes.

Exceptions

ArgumentNullExceptioncolumnIndexes is null.
ArgumentOutOfRangeExceptionrow is less than zero or greater than or equal to the number of rows in the matrix.
DimensionMismatchExceptionThe length of value does not equal the number of elements in columnIndexes.

Item(Int32, Func<T, Boolean>)

Gets or sets the elements of a row of the matrix that meet the specified condition.
C#
public Vector<T> this[
	int row,
	Func<T, bool> condition
] { get; set; }

Parameters

row  Int32
The zero-based index of the row.
condition  Func<T, Boolean>
A delegate that represents a predicate that specifies the condition to test.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this matrix.

Getting the value of this property returns a new vector with the elements for which condition is true. Setting the value of this property sets the selected elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of value does not equal the number of elements for which condition is true.

Item(Int32, Int32)

Gets or sets the specified element in this matrix.
C#
public T this[
	int row,
	int column
] { get; set; }

Parameters

row  Int32
The zero-based row index of the element to get or set.
column  Int32
The zero-based column index of the element to get or set.

Property Value

T
The element of the Matrix<T> in the columnth column of the rowth row.

Exceptions

ArgumentOutOfRangeExceptioncolumn is less than zero or greater than or equal to the number of columns in this Matrix<T>. Or, row is less than zero or greater than or equal to the number of rows in this instance.

Item(Range, Range)

Gets or sets the elements of a sub-matrix of this matrix.
C#
public Matrix<T> this[
	Range rowRange,
	Range columnRange
] { get; set; }

Parameters

rowRange  Range
A Range value that specifies the range of rows that are to make up the new matrix.
columnRange  Range
A Range value that specifies the range of columns that are to make up the new matrix.

Property Value

Matrix<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this instance.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of the range specified by rowRange does not equal the number of rows of value.

-or-

The length of the range specified by columnRange does not equal the number of columns of value.

Item(Range, IEnumerable<Int32>)

Gets or sets the elements of a matrix with the specified row range and column indexes.
C#
public Matrix<T> this[
	Range rowRange,
	IEnumerable<int> columnIndexes
] { get; set; }

Parameters

rowRange  Range
A Range value that specifies the range of elements that are to make up the new vector.
columnIndexes  IEnumerable<Int32>
A sequence of integers.

Property Value

Matrix<T>
A Matrix<T> that contains the elements of the matrix with row indexes in rowRange and column indexes in columnIndexes.

Item(Range, Int32)

Gets or sets the elements of a column of this matrix.
C#
public Vector<T> this[
	Range rowRange,
	int column
] { get; set; }

Parameters

rowRange  Range
A Range value that specifies the range .
column  Int32
The zero-based index of the column.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this instance.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of the range specified by rowRange does not equal the length of value.

Item(Range, IEnumerable<Int32>)

Gets or sets the elements of a matrix with the specified row range and column indexes.
C#
public Matrix<T> this[
	Range rowRange,
	IEnumerable<int> columnIndexes
] { get; set; }

Parameters

rowRange  Range
A Range value that specifies the range of elements that are to make up the new vector.
columnIndexes  IEnumerable<Int32>
A sequence of integers.

Property Value

Matrix<T>
A Matrix<T> that contains the elements of the matrix with row indexes in rowRange and column indexes in columnIndexes.

Item(Range, Index)

Gets or sets the elements of a column of this matrix.
C#
public Vector<T> this[
	Range rowRange,
	Index column
] { get; set; }

Parameters

rowRange  Range
A Range value that specifies the range of elements in the column.
column  Index
The zero-based index of the column.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this instance.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of the range specified by rowRange does not equal the length of value.

Item(Range, Range)

Gets or sets the elements of a sub-matrix of this matrix.
C#
public Matrix<T> this[
	Range rowRange,
	Range columnRange
] { get; set; }

Parameters

rowRange  Range
A Range value that specifies the range of rows that are to make up the new matrix.
columnRange  Range
A Range value that specifies the range of columns that are to make up the new matrix.

Property Value

Matrix<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a row of this instance.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of the range specified by rowRange does not equal the number of rows of value.

-or-

The length of the range specified by columnRange does not equal the number of columns of value.

Item(Vector<Boolean>, Int32)

Gets or sets the elements of a column of this matrix.
C#
public Vector<T> this[
	Vector<bool> mask,
	int column
] { get; set; }

Parameters

mask  Vector<Boolean>
A boolean vector that specifies the elements to select.
column  Int32
The zero-based index of the column.

Property Value

Vector<T>
A vector.

Remarks

This property allows you to directly retrieve or set the elements of a column of this matrix.

Getting the value of this property returns a vector that points to the specified elements of this instance. Setting the value of this property sets the specified elements to the values in the vector that is provided.

Exceptions

ArgumentNullExceptionvalue is null
DimensionMismatchException The length of value does not equal the number of true elements of mask.

See Also