SpanExtensions Class

Contains extension methods that operate on spans.

Definition

Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public static class SpanExtensions
Inheritance
Object  →  SpanExtensions

Methods

All<T>(ReadOnlySpan<T>, Func<T, Boolean>) Returns true if all elements of a span satisfy the specified predicate.
All<T, TPredicate>(ReadOnlySpan<T>, TPredicate) Returns true if all elements of a span satisfy the specified 'fast' predicate.
Any<T>(ReadOnlySpan<T>, Func<T, Boolean>) Returns true if at least one of the elements of a span satisfy the specified predicate.
Any<T, TPredicate>(ReadOnlySpan<T>, TPredicate) Returns true if at least one of the elements of a span satisfy the specified 'fast' predicate.
As2D<T>(ReadOnlySpan<T>, Int32) 
As2D<T>(Span<T>, Int32) 
AsSpanSlice<T>(T[]) 
AsSpanSlice<T>(ReadOnlySpan<T>) 
ClearToZero<T> 
Create<T>(Int32) 
Create<T>(Int32, Int32) 
Make2D<T>(ReadOnlySpan<T>, Int32) 
Make2D<T>(Span<T>, Int32) 
Map<T, U> Applies a function to the elements of a span and returns the result in another span.
MapInPlace<T> Applies a function in-place to the elements of a span.
Scalar<T> 
ToArray<T, U> Applies a function to the elements of a span and returns the result as an array.
WithStride<T>(ReadOnlySpan<T>, Int32) Returns a slice over a read-only span with the specified stride.
WithStride<T>(Span<T>, Int32) Returns a slice over a span with the specified stride.

See Also