17 instantiations of Tensor
System.Numerics.Tensors (17)
System\Numerics\Tensors\netcore\Tensor.cs (13)
297=> new Tensor<T>(array); 302=> new Tensor<T>(array, lengths, strides: []); 307=> new Tensor<T>(array, lengths, strides); 312=> new Tensor<T>(array, start, lengths, strides); 319=> new Tensor<T>(lengths, strides: [], pinned); 324=> new Tensor<T>(lengths, strides, pinned); 335return new Tensor<T>(values, in shape); 1304outTensor = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides); 1385return new Tensor<T>(tensor._values, tensor._start, lengths, strides); 1772outputs[i] = new Tensor<T>(values, newLengths, strides: []); 1843Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]); 2185Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides); 2266Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides);
System\Numerics\Tensors\netcore\Tensor_1.cs (4)
21public static Tensor<T> Empty { get; } = new(); 222return new Tensor<T>( 237return new Tensor<T>( 252return new Tensor<T>(
472 references to Tensor
System.Numerics.Tensors (472)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
520Tensor<T> tmp = Tensor.CreateFromShape<T>(Lengths, IsPinned);
System\Numerics\Tensors\netcore\Tensor.cs (441)
51/// Broadcast the data from <paramref name="source"/> to the smallest broadcastable shape compatible with <paramref name="lengthsSource"/>. Creates a new <see cref="Tensor{T}"/> and allocates new memory. 53/// <param name="source">Input <see cref="Tensor{T}"/>.</param> 54/// <param name="lengthsSource">Other <see cref="Tensor{T}"/> to make shapes broadcastable.</param> 55public static Tensor<T> Broadcast<T>(scoped in ReadOnlyTensorSpan<T> source, scoped in ReadOnlyTensorSpan<T> lengthsSource) 61/// Broadcast the data from <paramref name="source"/> to the new shape <paramref name="lengths"/>. Creates a new <see cref="Tensor{T}"/> and allocates new memory. 64/// <param name="source">Input <see cref="Tensor{T}"/>.</param> 67public static Tensor<T> Broadcast<T>(scoped in ReadOnlyTensorSpan<T> source, scoped ReadOnlySpan<nint> lengths) 70Tensor<T> destination = CreateFromShapeUninitialized<T>(lengths); 82public static void BroadcastTo<T>(this Tensor<T> source, in TensorSpan<T> destination) 116public static Tensor<T> Concatenate<T>(params scoped ReadOnlySpan<Tensor<T>> tensors) 126public static Tensor<T> ConcatenateOnDimension<T>(int dimension, params scoped ReadOnlySpan<Tensor<T>> tensors) 134Tensor<T> tensor; 187public static ref readonly TensorSpan<T> Concatenate<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination) 199public static ref readonly TensorSpan<T> ConcatenateOnDimension<T>(int dimension, scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination) 267Tensor<T> slice = tensors[i].Slice(ranges); 296public static Tensor<T> Create<T>(T[] array) 301public static Tensor<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths) 306public static Tensor<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 311public static Tensor<T> Create<T>(T[] array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 318public static Tensor<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false) 323public static Tensor<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 327public static Tensor<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false) 331public static Tensor<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 390public static Tensor<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 393TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 421public static Tensor<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, T y) 424Tensor<bool> destination = CreateFromShapeUninitialized<bool>(x.Lengths); 510/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 524/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 539/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 544/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and 546public static Tensor<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 549TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 557/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 563/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and 575/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 580/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 582public static Tensor<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, T y) 585Tensor<bool> destination = CreateFromShape<bool>(x.Lengths, false); 592/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 598/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 610/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 615/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 617public static Tensor<bool> GreaterThan<T>(T x, in ReadOnlyTensorSpan<T> y) 622/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 628/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 720/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 725/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and 727public static Tensor<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 730TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 738/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 744/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and 756/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 761/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 763public static Tensor<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y) 766Tensor<bool> destination = CreateFromShape<bool>(x.Lengths, false); 773/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 779/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 791/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 796/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 798public static Tensor<bool> GreaterThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y) 803/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 809/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 901/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 906/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and 908public static Tensor<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 911TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 919/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 925/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and 936/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 937/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 940/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 942/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 944public static Tensor<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, T y) 947Tensor<bool> destination = CreateFromShape<bool>(x.Lengths, false); 953/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 954/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 957/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 960/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 971/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 972/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 975/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 977/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 979public static Tensor<bool> LessThan<T>(T x, in ReadOnlyTensorSpan<T> y) 983/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 984/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 987/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 990/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1082/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1087/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and 1089public static Tensor<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 1092TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 1100/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1106/// <returns>A <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and 1117/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1118/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1121/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1123/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1125public static Tensor<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y) 1128Tensor<bool> destination = CreateFromShape<bool>(x.Lengths, false); 1134/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1135/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1138/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1141/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1152/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1153/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1156/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1158/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1160public static Tensor<bool> LessThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y) 1164/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1165/// It returns a <see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1168/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1171/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1263/// If <paramref name="tensor"/> is a 1D tensor, it will return <paramref name="tensor"/>. Otherwise it creates a new <see cref="Tensor{T}"/> 1266/// <param name="tensor">Input <see cref="Tensor{T}"/></param> 1268public static Tensor<T> PermuteDimensions<T>(this Tensor<T> tensor, ReadOnlySpan<int> dimensions) 1282Tensor<T> outTensor; 1320/// <param name="tensor"><see cref="Tensor{T}"/> you want to reshape.</param> 1322public static Tensor<T> Reshape<T>(this Tensor<T> tensor, ReadOnlySpan<nint> lengths) 1542/// Creates a new <see cref="Tensor{T}"/>, allocates new memory, and copies the data from <paramref name="tensor"/>. If the final shape is smaller all data after 1545/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1547public static Tensor<T> Resize<T>(Tensor<T> tensor, ReadOnlySpan<nint> lengths) 1551Tensor<T> output = Create(values, lengths, []); 1566/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1568public static void ResizeTo<T>(scoped in Tensor<T> tensor, in TensorSpan<T> destination) 1605/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1606public static Tensor<T> Reverse<T>(in ReadOnlyTensorSpan<T> tensor) 1608Tensor<T> output = CreateFromShape<T>(tensor.Lengths); 1618/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1620public static Tensor<T> ReverseDimension<T>(in ReadOnlyTensorSpan<T> tensor, int dimension) 1622Tensor<T> output = CreateFromShape<T>(tensor.Lengths); 1710/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1713public static Tensor<T> SetSlice<T>(this Tensor<T> tensor, in ReadOnlyTensorSpan<T> values, params ReadOnlySpan<NRange> ranges) 1722/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1741/// Split a <see cref="Tensor{T}"/> into <paramref name="splitCount"/> along the given <paramref name="dimension"/>. If the tensor cannot be split 1744/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1747public static Tensor<T>[] Split<T>(scoped in ReadOnlyTensorSpan<T> tensor, int splitCount, nint dimension) 1754Tensor<T>[] outputs = new Tensor<T>[splitCount]; 1787/// <param name="tensor">The <see cref="Tensor{T}"/> to remove all dimensions of length 1.</param> 1788public static Tensor<T> Squeeze<T>(this Tensor<T> tensor) 1797/// <param name="tensor">The <see cref="Tensor{T}"/> to remove dimension of length 1.</param> 1799public static Tensor<T> SqueezeDimension<T>(this Tensor<T> tensor, int dimension) 1843Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]); 1988/// Join multiple <see cref="Tensor{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape. 1990/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 1991public static Tensor<T> Stack<T>(params ReadOnlySpan<Tensor<T>> tensors) 1997/// Join multiple <see cref="Tensor{T}"/> along a new dimension. The axis parameter specifies the index of the new dimension. All tensors must have the same shape. 1999/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2001public static Tensor<T> StackAlongDimension<T>(int dimension, params ReadOnlySpan<Tensor<T>> tensors) 2017Tensor<T>[] outputs = new Tensor<T>[tensors.Length]; 2026/// Join multiple <see cref="Tensor{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape. 2028/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2030public static ref readonly TensorSpan<T> Stack<T>(scoped in ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination) 2036/// Join multiple <see cref="Tensor{T}"/> along a new dimension. The axis parameter specifies the index of the new dimension. All tensors must have the same shape. 2038/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2041public static ref readonly TensorSpan<T> StackAlongDimension<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination, int dimension) 2057Tensor<T>[] outputs = new Tensor<T>[tensors.Length]; 2151/// Creates a <see cref="string"/> representation of the <see cref="Tensor{T}"/>."/> 2156public static string ToString<T>(this Tensor<T> tensor, ReadOnlySpan<nint> maximumLengths) 2165/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 2166public static Tensor<T> Transpose<T>(Tensor<T> tensor) 2185Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides); 2199/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 2201public static bool TryBroadcastTo<T>(this Tensor<T> tensor, in TensorSpan<T> destination) 2238/// <param name="tensor">The <see cref="Tensor{T}"/> to add a dimension of length 1.</param> 2240public static Tensor<T> Unsqueeze<T>(this Tensor<T> tensor, int dimension) 2266Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides); 2350/// Takes the absolute value of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2353public static Tensor<T> Abs<T>(in ReadOnlyTensorSpan<T> x) 2356Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2377/// Takes the inverse cosine of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2380public static Tensor<T> Acos<T>(in ReadOnlyTensorSpan<T> x) 2383Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2389/// Takes the inverse cosine of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2404/// Takes the inverse hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2407public static Tensor<T> Acosh<T>(in ReadOnlyTensorSpan<T> x) 2410Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2431/// Takes the inverse hyperbolic cosine divided by pi of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2434public static Tensor<T> AcosPi<T>(in ReadOnlyTensorSpan<T> x) 2437Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2458/// Adds each element of <paramref name="x"/> to each element of <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 2462public static Tensor<T> Add<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2465TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 2471/// Adds <paramref name="y"/> to each element of <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 2475public static Tensor<T> Add<T>(in ReadOnlyTensorSpan<T> x, T y) 2478Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2514/// Takes the inverse sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2517public static Tensor<T> Asin<T>(in ReadOnlyTensorSpan<T> x) 2520Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2541/// Takes the inverse hyperbolic sine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2544public static Tensor<T> Asinh<T>(in ReadOnlyTensorSpan<T> x) 2547Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2568/// Takes the inverse hyperbolic sine divided by pi of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2571public static Tensor<T> AsinPi<T>(in ReadOnlyTensorSpan<T> x) 2574Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2595/// Takes the arc tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2598public static Tensor<T> Atan<T>(in ReadOnlyTensorSpan<T> x) 2601Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2622/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2626public static Tensor<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2629Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2649/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2653public static Tensor<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, T y) 2656Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2676/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2680public static Tensor<T> Atan2<T>(T x, in ReadOnlyTensorSpan<T> y) 2683Tensor<T> destination = CreateFromShapeUninitialized<T>(y.Lengths); 2705/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/>, divides each element by pi, and returns a new <see cref="Tensor{T}"/> with the result. 2709public static Tensor<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2712Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2736public static Tensor<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, T y) 2739Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2763public static Tensor<T> Atan2Pi<T>(T x, in ReadOnlyTensorSpan<T> y) 2766Tensor<T> destination = CreateFromShapeUninitialized<T>(y.Lengths); 2788/// Takes the inverse hyperbolic tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2791public static Tensor<T> Atanh<T>(in ReadOnlyTensorSpan<T> x) 2794Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2815/// Takes the inverse hyperbolic tangent divided by pi of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2818public static Tensor<T> AtanPi<T>(in ReadOnlyTensorSpan<T> x) 2821Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2859/// Computes the element-wise bitwise and of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2863public static Tensor<T> BitwiseAnd<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2866Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2886/// Computes the element-wise bitwise and of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2890public static Tensor<T> BitwiseAnd<T>(in ReadOnlyTensorSpan<T> x, T y) 2893Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2915/// Computes the element-wise bitwise of of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2919public static Tensor<T> BitwiseOr<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2922Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2942/// Computes the element-wise bitwise or of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2946public static Tensor<T> BitwiseOr<T>(in ReadOnlyTensorSpan<T> x, T y) 2949Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2971/// Computes the element-wise cube root of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2974public static Tensor<T> Cbrt<T>(in ReadOnlyTensorSpan<T> x) 2977Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 2998/// Computes the element-wise ceiling of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3001public static Tensor<T> Ceiling<T>(in ReadOnlyTensorSpan<T> x) 3004Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3029public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3033Tensor<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths); 3060public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3064Tensor<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths); 3091public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3095Tensor<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths); 3122public static Tensor<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, T sign) 3125Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3131/// Computes the element-wise result of copying the sign from one number to another number in the specified tensors and returns a new <see cref="Tensor{T}"/> with the result. 3135public static Tensor<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> sign) 3138Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3174/// Takes the cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3177public static Tensor<T> Cos<T>(in ReadOnlyTensorSpan<T> x) 3180Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3201/// Takes the hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3204public static Tensor<T> Cosh<T>(in ReadOnlyTensorSpan<T> x) 3207Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3243/// <summary>Computes the element-wise cosine of the value in the specified tensor that has been multiplied by Pi and returns a new <see cref="Tensor{T}"/> with the results.</summary> 3257public static Tensor<T> CosPi<T>(in ReadOnlyTensorSpan<T> x) 3260Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3294public static Tensor<T> DegreesToRadians<T>(in ReadOnlyTensorSpan<T> x) 3297Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3334/// Divides each element of <paramref name="x"/> by <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 3338public static Tensor<T> Divide<T>(in ReadOnlyTensorSpan<T> x, T y) 3341Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3347/// Divides <paramref name="x"/> by each element of <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result."/> 3351public static Tensor<T> Divide<T>(T x, in ReadOnlyTensorSpan<T> y) 3354Tensor<T> destination = CreateFromShapeUninitialized<T>(y.Lengths); 3365public static Tensor<T> Divide<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3368TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3438public static Tensor<T> Exp<T>(in ReadOnlyTensorSpan<T> x) 3441Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3465public static Tensor<T> Exp10<T>(in ReadOnlyTensorSpan<T> x) 3468Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3490public static Tensor<T> Exp10M1<T>(in ReadOnlyTensorSpan<T> x) 3493Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3513public static Tensor<T> Exp2<T>(in ReadOnlyTensorSpan<T> x) 3516Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3536public static Tensor<T> Exp2M1<T>(in ReadOnlyTensorSpan<T> x) 3539Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3559public static Tensor<T> ExpM1<T>(in ReadOnlyTensorSpan<T> x) 3562Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3582public static Tensor<T> Floor<T>(in ReadOnlyTensorSpan<T> x) 3585Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3609public static Tensor<T> Hypot<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3612TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3638public static Tensor<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3641TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3662public static Tensor<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, T y) 3665Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3685public static Tensor<T> Ieee754Remainder<T>(T x, in ReadOnlyTensorSpan<T> y) 3688Tensor<T> destination = CreateFromShapeUninitialized<T>(y.Lengths); 3709public static Tensor<int> ILogB<T>(in ReadOnlyTensorSpan<T> x) 3712Tensor<int> destination = CreateFromShapeUninitialized<int>(x.Lengths); 3781public static Tensor<T> LeadingZeroCount<T>(in ReadOnlyTensorSpan<T> x) 3784Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3805/// Takes the natural logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3808public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x) 3811Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3832public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3835TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3855public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x, T y) 3858Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3878/// Takes the base 10 logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3881public static Tensor<T> Log10<T>(in ReadOnlyTensorSpan<T> x) 3884Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3905/// Takes the base 10 logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3908public static Tensor<T> Log10P1<T>(in ReadOnlyTensorSpan<T> x) 3911Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3932/// Takes the base 2 logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3935public static Tensor<T> Log2<T>(in ReadOnlyTensorSpan<T> x) 3938Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3959/// Takes the base 2 logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3962public static Tensor<T> Log2P1<T>(in ReadOnlyTensorSpan<T> x) 3965Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 3986/// Takes the natural logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3989public static Tensor<T> LogP1<T>(in ReadOnlyTensorSpan<T> x) 3992Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4030public static Tensor<T> Max<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4033TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> output); 4053public static Tensor<T> Max<T>(in ReadOnlyTensorSpan<T> x, T y) 4056Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4093public static Tensor<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4096TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4116public static Tensor<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y) 4119Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4156public static Tensor<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4159TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4179public static Tensor<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4182Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4219public static Tensor<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4222TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4242public static Tensor<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4245Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4282public static Tensor<T> Min<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4285TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> output); 4305public static Tensor<T> Min<T>(in ReadOnlyTensorSpan<T> x, T y) 4308Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4345public static Tensor<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4348TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4368public static Tensor<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y) 4371Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4408public static Tensor<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4411TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4431public static Tensor<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4434Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4471public static Tensor<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4474TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4494public static Tensor<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4497Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4517/// Multiplies each element of <paramref name="x"/> with <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 4521public static Tensor<T> Multiply<T>(in ReadOnlyTensorSpan<T> x, T y) 4524Tensor<T> destination = CreateFromShape<T>(x.Lengths); 4530/// Multiplies each element of <paramref name="x"/> with <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 4535public static Tensor<T> Multiply<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4538TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4576public static Tensor<T> Negate<T>(in ReadOnlyTensorSpan<T> x) 4579Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4613public static Tensor<T> OnesComplement<T>(in ReadOnlyTensorSpan<T> x) 4616Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4636public static Tensor<T> PopCount<T>(in ReadOnlyTensorSpan<T> x) 4639Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4660public static Tensor<T> Pow<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4663TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4683public static Tensor<T> Pow<T>(in ReadOnlyTensorSpan<T> x, T y) 4686Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4706public static Tensor<T> Pow<T>(T x, in ReadOnlyTensorSpan<T> y) 4709Tensor<T> destination = CreateFromShapeUninitialized<T>(y.Lengths); 4742public static Tensor<T> RadiansToDegrees<T>(in ReadOnlyTensorSpan<T> x) 4745Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4765public static Tensor<T> Reciprocal<T>(in ReadOnlyTensorSpan<T> x) 4768Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4789public static Tensor<T> RootN<T>(in ReadOnlyTensorSpan<T> x, int n) 4792Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4815public static Tensor<T> RotateLeft<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount) 4818Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4842public static Tensor<T> RotateRight<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount) 4845Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4867public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x) 4870Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4890public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits, MidpointRounding mode) 4893Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4914public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits) 4917Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4937public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, MidpointRounding mode) 4940Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4961public static Tensor<T> Sigmoid<T>(in ReadOnlyTensorSpan<T> x) 4964Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 4983/// Takes the sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 4986public static Tensor<T> Sin<T>(in ReadOnlyTensorSpan<T> x) 4989Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5011public static Tensor<T> Sinh<T>(in ReadOnlyTensorSpan<T> x) 5014Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5034public static Tensor<T> SinPi<T>(in ReadOnlyTensorSpan<T> x) 5037Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5057public static Tensor<T> SoftMax<T>(in ReadOnlyTensorSpan<T> x) 5063Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5085/// Takes the square root of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5088public static Tensor<T> Sqrt<T>(in ReadOnlyTensorSpan<T> x) 5091Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5130/// Subtracts <paramref name="y"/> from each element of <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 5134public static Tensor<T> Subtract<T>(in ReadOnlyTensorSpan<T> x, T y) 5137Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5143/// Subtracts each element of <paramref name="y"/> from <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 5147public static Tensor<T> Subtract<T>(T x, in ReadOnlyTensorSpan<T> y) 5150Tensor<T> destination = CreateFromShapeUninitialized<T>(y.Lengths); 5156/// Subtracts each element of <paramref name="x"/> from <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 5160public static Tensor<T> Subtract<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 5163TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 5244public static Tensor<T> Tan<T>(in ReadOnlyTensorSpan<T> x) 5247Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5267public static Tensor<T> Tanh<T>(in ReadOnlyTensorSpan<T> x) 5270Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5290public static Tensor<T> TanPi<T>(in ReadOnlyTensorSpan<T> x) 5293Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5313public static Tensor<T> TrailingZeroCount<T>(in ReadOnlyTensorSpan<T> x) 5316Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5336public static Tensor<T> Truncate<T>(in ReadOnlyTensorSpan<T> x) 5339Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths); 5360public static Tensor<T> Xor<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 5363TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 5381/// Computes the element-wise Xor of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5385public static Tensor<T> Xor<T>(in ReadOnlyTensorSpan<T> x, T y) 5388Tensor<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
System\Numerics\Tensors\netcore\Tensor_1.cs (28)
18public sealed class Tensor<T> : ITensor<Tensor<T>, T>, IEnumerable<T> 21public static Tensor<T> Empty { get; } = new(); 93public Tensor<T> this[params ReadOnlySpan<NRange> ranges] 126public static implicit operator Tensor<T>(T[] array) => Tensor.Create(array); 131public static implicit operator TensorSpan<T>(Tensor<T> tensor) => tensor.AsTensorSpan(); 134public static implicit operator ReadOnlyTensorSpan<T>(Tensor<T> tensor) => tensor.AsReadOnlyTensorSpan(); 215public Tensor<T> Slice(params ReadOnlySpan<nint> startIndexes) 230public Tensor<T> Slice(params ReadOnlySpan<NIndex> startIndexes) 245public Tensor<T> Slice(params ReadOnlySpan<NRange> ranges) 260public Tensor<T> ToDenseTensor() 262Tensor<T> result = this; 295/// <returns>A <see cref="string"/> representation of the <see cref="Tensor{T}"/></returns> 331ref readonly T IReadOnlyTensor<Tensor<T>, T>.this[params ReadOnlySpan<nint> indexes] => ref this[indexes]; 333ref readonly T IReadOnlyTensor<Tensor<T>, T>.this[params ReadOnlySpan<NIndex> indexes] => ref this[indexes]; 335ReadOnlyTensorDimensionSpan<T> IReadOnlyTensor<Tensor<T>, T>.GetDimensionSpan(int dimension) => AsReadOnlyTensorSpan().GetDimensionSpan(dimension); 337ref readonly T IReadOnlyTensor<Tensor<T>, T>.GetPinnableReference() => ref GetPinnableReference(); 339ReadOnlySpan<T> IReadOnlyTensor<Tensor<T>, T>.GetSpan(scoped ReadOnlySpan<nint> startIndexes, int length) => AsReadOnlyTensorSpan().GetSpan(startIndexes, length); 341ReadOnlySpan<T> IReadOnlyTensor<Tensor<T>, T>.GetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length) => AsReadOnlyTensorSpan().GetSpan(startIndexes, length); 375static Tensor<T> ITensor<Tensor<T>, T>.CreateFromShape(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.CreateFromShape<T>(lengths, pinned); 377static Tensor<T> ITensor<Tensor<T>, T>.CreateFromShape(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.CreateFromShape<T>(lengths, strides, pinned); 379static Tensor<T> ITensor<Tensor<T>, T>.CreateFromShapeUninitialized(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.CreateFromShapeUninitialized<T>(lengths, pinned); 381static Tensor<T> ITensor<Tensor<T>, T>.CreateFromShapeUninitialized(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.CreateFromShapeUninitialized<T>(lengths, strides, pinned); 386private readonly Tensor<T> _tensor; 391internal Enumerator(Tensor<T> tensor)
System\Numerics\Tensors\netcore\TensorOperation.cs (1)
359public static void ValidateCompatibility<TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in ReadOnlyTensorSpan<TArg> y, out Tensor<TResult> destination)
System\Runtime\InteropServices\TensorMarshal.cs (1)
9/// <summary>Provides methods to interoperate with <see cref="Tensor{T}" />, <see cref="TensorSpan{T}" />, and <see cref="ReadOnlyTensorSpan{T}" />.</summary>