Tensor<T>.Item Property

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3

Overload List

Item[AdvancedTensorIndex] Gets or sets the elements of a tensor specified by an 'advanced' tensor index.
Item[AdvancedTensorIndex[]] Gets or sets the elements of a tensor specified by a set of tensor indices.
Item[ReadOnlySpan<TensorIndex>] Gets or sets the elements of a tensor specified by a set of tensor indices.
Item[Tensor<Boolean>] Gets or sets the elements whose corresponding value in a boolean tensor is true.
Item[TensorIndex] Gets or sets the elements of a tensor specified by a tensor index.
Item[TensorIndex[]] Gets or sets the elements of a tensor specified by a set of tensor indices.
Item[AdvancedTensorIndex, AdvancedTensorIndex] Gets or sets the elements of a tensor specified by two 'advanced' tensor indices.
Item[TensorIndex, TensorIndex] Gets or sets the elements of a tensor specified by two tensor indices.
Item[AdvancedTensorIndex, AdvancedTensorIndex, AdvancedTensorIndex] Gets or sets the elements of a tensor specified by three 'advanced' tensor indices.
Item[TensorIndex, TensorIndex, TensorIndex] Gets or sets the elements of a tensor specified by three tensor indices.

Item(AdvancedTensorIndex)

Gets or sets the elements of a tensor specified by an 'advanced' tensor index.
C#
public virtual Tensor<T> this[
	AdvancedTensorIndex index
] { get; set; }

Parameters

index  AdvancedTensorIndex
An index that can be implicitly converted to an AdvancedTensorIndex.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements specified by index.

Item(AdvancedTensorIndex[])

Gets or sets the elements of a tensor specified by a set of tensor indices.
C#
public abstract Tensor<T> this[
	params AdvancedTensorIndex[] indices
] { get; set; }

Parameters

indices  AdvancedTensorIndex[]
A parameter array of tensor indices.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements from each dimension specified by indices.

Item(ReadOnlySpan<TensorIndex>)

Gets or sets the elements of a tensor specified by a set of tensor indices.
C#
public abstract Tensor<T> this[
	ReadOnlySpan<TensorIndex> indices
] { get; set; }

Parameters

indices  ReadOnlySpan<TensorIndex>
A read-only span of tensor indices.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements from each dimension specified by indices.

Item(Tensor<Boolean>)

Gets or sets the elements whose corresponding value in a boolean tensor is true.
C#
public abstract Tensor<T> this[
	Tensor<bool> mask
] { get; set; }

Parameters

mask  Tensor<Boolean>
A boolean tensor of dimension compatible with this instance.

Return Value

Tensor<T>
A 1-dimensional tensor containing the elements whose corresponding value in mask is true.

Item(TensorIndex)

Gets or sets the elements of a tensor specified by a tensor index.
C#
public virtual Tensor<T> this[
	TensorIndex index
] { get; set; }

Parameters

index  TensorIndex
An index that can be implicitly converted to a TensorIndex.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements specified by index.

Item(TensorIndex[])

Gets or sets the elements of a tensor specified by a set of tensor indices.
C#
public Tensor<T> this[
	params TensorIndex[] indices
] { get; set; }

Parameters

indices  TensorIndex[]
A parameter array of tensor indices.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements from each dimension specified by indices.

Item(AdvancedTensorIndex, AdvancedTensorIndex)

Gets or sets the elements of a tensor specified by two 'advanced' tensor indices.
C#
public virtual Tensor<T> this[
	AdvancedTensorIndex index1,
	AdvancedTensorIndex index2
] { get; set; }

Parameters

index1  AdvancedTensorIndex
An index that can be implicitly converted to a AdvancedTensorIndex for the first dimension.
index2  AdvancedTensorIndex
An index that can be implicitly converted to a AdvancedTensorIndex for the second dimension.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements specified by index1 and index2.

Item(TensorIndex, TensorIndex)

Gets or sets the elements of a tensor specified by two tensor indices.
C#
public virtual Tensor<T> this[
	TensorIndex index1,
	TensorIndex index2
] { get; set; }

Parameters

index1  TensorIndex
An index that can be implicitly converted to a TensorIndex for the first dimension.
index2  TensorIndex
An index that can be implicitly converted to a TensorIndex for the second dimension.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements specified by index1 and index2.

Item(AdvancedTensorIndex, AdvancedTensorIndex, AdvancedTensorIndex)

Gets or sets the elements of a tensor specified by three 'advanced' tensor indices.
C#
public virtual Tensor<T> this[
	AdvancedTensorIndex index1,
	AdvancedTensorIndex index2,
	AdvancedTensorIndex index3
] { get; set; }

Parameters

index1  AdvancedTensorIndex
An index that can be implicitly converted to a AdvancedTensorIndex for the first dimension.
index2  AdvancedTensorIndex
An index that can be implicitly converted to a AdvancedTensorIndex for the second dimension.
index3  AdvancedTensorIndex
An index that can be implicitly converted to a AdvancedTensorIndex for the second dimension.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements specified by index1, index2, and index3.

Item(TensorIndex, TensorIndex, TensorIndex)

Gets or sets the elements of a tensor specified by three tensor indices.
C#
public virtual Tensor<T> this[
	TensorIndex index1,
	TensorIndex index2,
	TensorIndex index3
] { get; set; }

Parameters

index1  TensorIndex
An index that can be implicitly converted to a TensorIndex for the first dimension.
index2  TensorIndex
An index that can be implicitly converted to a TensorIndex for the second dimension.
index3  TensorIndex
An index that can be implicitly converted to a TensorIndex for the third dimension.

Return Value

Tensor<T>
A tensor of the same element type that contains the elements specified by index1, index2, and index3.

See Also