Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a tensor.
generic <typename TSelf, typename T>
where TSelf : ITensor<TSelf, T>public interface class ITensor : System::Collections::Generic::IEnumerable<T>, System::Numerics::Tensors::IReadOnlyTensor<TSelf, T>, System::Numerics::Tensors::ITensor
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5001", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public interface ITensor<TSelf,T> : System.Collections.Generic.IEnumerable<T>, System.Numerics.Tensors.IReadOnlyTensor<TSelf,T>, System.Numerics.Tensors.ITensor where TSelf : ITensor<TSelf,T>
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5001", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type ITensor<'Self, 'T (requires 'Self :> ITensor<'Self, 'T>)> = interface
interface ITensor
interface IReadOnlyTensor
interface IReadOnlyTensor<'Self, 'T (requires 'Self :> ITensor<'Self, 'T>)>
interface seq<'T>
interface IEnumerable
Public Interface ITensor(Of TSelf, T)
Implements IEnumerable(Of T), IReadOnlyTensor(Of TSelf, T), ITensor
The type that implements this interface.
The element type.
Flattened |
Gets the total number of items in the tensor. (Inherited from IReadOnlyTensor) |
Has |
Determines if the current tensor has any dimension where |
Is |
Determines if the current tensor is dense. (Inherited from IReadOnlyTensor) |
Is |
Gets a value indicating whether this tensor is empty. (Inherited from IReadOnlyTensor) |
Is |
Gets a value that indicates whether the underlying buffer is pinned. (Inherited from IReadOnlyTensor) |
Is |
Gets a value that indicates whether the tensor is read-only. (Inherited from ITensor) |
Item[Read |
Gets the value at the specified indexes. |
Item[Read |
Gets the value at the specified indexes. |
Item[Read |
Gets or sets a slice out of the current tensor that contains a specified range. |
Lengths |
Gets the length of each dimension in the tensor. (Inherited from IReadOnlyTensor) |
Rank |
Gets the rank, or number of dimensions, in the tensor. (Inherited from IReadOnlyTensor) |
Strides |
Gets the stride of each dimension in the tensor. (Inherited from IReadOnlyTensor) |
As |
Creates a new readonly tensor span over the tensor. (Inherited from IReadOnlyTensor<TSelf,T>) |
As |
Creates a new readonly tensor span over a portion of the tensor starting at a specified position to the end of the tensor. (Inherited from IReadOnlyTensor<TSelf,T>) |
As |
Creates a read-only tensor span for the specified start indexes. (Inherited from IReadOnlyTensor<TSelf,T>) |
As |
Creates a new readonly tensor span over a portion of the tensor defined by the specified range. (Inherited from IReadOnlyTensor<TSelf,T>) |
As |
Creates a new tensor span over the tensor. |
As |
Creates a new tensor span over a portion of the tensor starting at a specified position to the end of the tensor. |
As |
Creates a tensor span for the specified start indexes. |
As |
Creates a new tensor span over a portion of the tensor defined by the specified range. |
Clear() |
Clears the contents of the tensor span. (Inherited from ITensor) |
Copy |
Copies the contents of the tensor into a destination tensor span. (Inherited from IReadOnlyTensor<TSelf,T>) |
Create(Read |
Creates a new tensor with the specified lengths. |
Create(Read |
Creates a new tensor with the specified lengths and strides. |
Create |
Creates a new tensor with the specified lengths and strides. |
Create |
Creates a new tensor with the specified lengths and strides. If |
Fill(Object) |
Fills the elements of this tensor with a specified value. (Inherited from ITensor) |
Fill(T) |
Fills the contents of this tensor with the given value. |
Flatten |
Flattens the contents of the tensor into a destination span. (Inherited from IReadOnlyTensor<TSelf,T>) |
Get |
Returns a span that can be used to access the flattened elements for a given dimension. |
Get |
Returns an enumerator that iterates through a collection. (Inherited from IEnumerable) |
Get |
Returns a reference to the 0th element of the tensor. If the tensor is empty, returns |
Get |
Pins and gets a MemoryHandle to the backing memory. (Inherited from IReadOnlyTensor) |
Slice(Read |
Forms a slice out of the current tensor that begins at a specified index. (Inherited from IReadOnlyTensor<TSelf,T>) |
Slice(Read |
Slices the tensor using the specified start indexes. (Inherited from IReadOnlyTensor<TSelf,T>) |
Slice(Read |
Gets a slice out of the current tensor that contains a specified range. (Inherited from IReadOnlyTensor<TSelf,T>) |
To |
Creates a dense tensor from the elements of the current tensor. (Inherited from IReadOnlyTensor<TSelf,T>) |
Try |
Attempts to copy the contents of this tensor into a destination tensor span and returns a value to indicate whether or not the operation succeeded. (Inherited from IReadOnlyTensor<TSelf,T>) |
Try |
Attempts to flatten the contents of this tensor into a destination span and returns a value to indicate whether or not the operation succeeded. (Inherited from IReadOnlyTensor<TSelf,T>) |
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in