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 read-only tensor.
generic <typename TSelf, typename T>
where TSelf : IReadOnlyTensor<TSelf, T>public interface class IReadOnlyTensor : System::Collections::Generic::IEnumerable<T>, System::Numerics::Tensors::IReadOnlyTensor
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5001", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public interface IReadOnlyTensor<TSelf,T> : System.Collections.Generic.IEnumerable<T>, System.Numerics.Tensors.IReadOnlyTensor where TSelf : IReadOnlyTensor<TSelf,T>
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5001", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type IReadOnlyTensor<'Self, 'T (requires 'Self :> IReadOnlyTensor<'Self, 'T>)> = interface
interface IReadOnlyTensor
interface seq<'T>
interface IEnumerable
Public Interface IReadOnlyTensor(Of TSelf, T)
Implements IEnumerable(Of T), IReadOnlyTensor
The type that implements this interface.
The element type.
Empty |
Gets an empty tensor. |
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) |
Item[Read |
Gets a reference to the specified element of the tensor. |
Item[Read |
Gets the value at the specified indexes. |
Item[Read |
Gets the values at the specified ranges. |
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. |
As |
Creates a new readonly tensor span over a portion of the tensor starting at a specified position to the end of the tensor. |
As |
Creates a read-only tensor span for the specified start indexes. |
As |
Creates a new readonly tensor span over a portion of the tensor defined by the specified range. |
Copy |
Copies the contents of the tensor into a destination tensor span. |
Flatten |
Flattens the contents of the tensor into a destination span. |
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 an object of type |
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. |
Slice(Read |
Slices the tensor using the specified start indexes. |
Slice(Read |
Gets a slice out of the current tensor that contains a specified range. |
To |
Creates a dense tensor from the elements of the current tensor. |
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. |
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. |
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