Tensor<T>.Transform Method

Definition

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

Overload List

Transform<TResult>(Func<T, TResult>) Returns a tensor that lazily applies the specified operation to each element of the current tensor.
Transform<TTransformation, TResult>(TTransformation) Returns a tensor that lazily applies the specified operation to each element of the current tensor.

Transform<TResult>(Func<T, TResult>)

Returns a tensor that lazily applies the specified operation to each element of the current tensor.
C#
public Tensor<TResult> Transform<TResult>(
	Func<T, TResult> transform
)

Parameters

transform  Func<T, TResult>
A function that performs the transformation.

Type Parameters

TResult
The type of the result of the transformation.

Return Value

Tensor<TResult>
A tensor that results from applying transform to each element of this tensor.

Transform<TTransformation, TResult>(TTransformation)

Returns a tensor that lazily applies the specified operation to each element of the current tensor.
C#
public Tensor<TResult> Transform<TTransformation, TResult>(
	TTransformation transform
)
where TTransformation : struct, new(), IFastFunc<T, TResult>

Parameters

transform  TTransformation
A 'fast' function that performs the transformation.

Type Parameters

TTransformation
The type of transform.
TResult
The type of the return value of transform.

Return Value

Tensor<TResult>
A tensor that results from applying transform to each element of this tensor.

See Also