Slice Structure

Represents a set of indexes at equally spaced intervals.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public struct Slice : IEnumerable<int>, IEnumerable
Inheritance
Object  →  ValueType  →  Slice
Implements
IEnumerable<Int32>, IEnumerable

Constructors

Slice Constructs a new slice.

Properties

End Gets the last index in the slice.
IsDescending Gets whether the indexes are decreasing.
Item[Int32] Gets the index at the specified position in the slice.
Item[Slice] Returns a slice of the current slice.
Length Gets the length of the slice.
Start Gets the first index in the slice.
Stride Gets the number of elements between successive indexes in the slice.

Methods

AllGreaterThan Gets whether all indexes in the slice are greater than to the specified value.
AllGreaterThanOrEqual Gets whether all indexes in the slice are greater than or equal to the specified value.
AllLessThan Gets whether all indexes in the slice are less than the specified value.
AllLessThanOrEqual Gets whether all indexes in the slice are less than or equal to the specified value.
Contains Gets whether the specified index is within the range of the slice.
ContainsInside Gets whether the specified index is strictly within the range of the slice, excluding the end points.
EqualsIndicates whether this instance and a specified object are equal.
(Overrides ValueType.Equals(Object))
FromLength Creates a slice of the specified length which starts at 0 and has unit stride.
FromRange Creates a slice over the specified range.
GetEnumerator Returns an enumerator for this slice.
GetHashCodeReturns the hash code for this instance.
(Overrides ValueType.GetHashCode())
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsComplete Gets whether the slice contains all indexes from 0 up to the specified length.
ToStringReturns the fully qualified type name of this instance.
(Inherited from ValueType)

Operators

Equality(Slice, Slice) Returns whether two slices are equal.
Inequality(Slice, Slice) Returns whether two slices are not equal.

Fields

Empty Returns a slice that has no elements.

Extension Methods

Group<Int32> Returns a grouping by the unique elements in a sequence.
(Defined by Grouping)
Group<Int32> Returns a grouping by the unique elements in a sequence using the specified comparer to determine equality.
(Defined by Grouping)
StandardDeviation<Int32> Returns the standard deviation of the elements of a sequence.
(Defined by Stats)
Sum<Int32> Computes the sum of the sequence of values.
(Defined by ArrayMath)
Sum<Int32, U> Computes the sum of the sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by ArrayMath)
Sum<Int32, T2, U> Computes the sum of the sequence of values that are obtained by invoking a transform function on each pair of elements of the input sequences.
(Defined by ArrayMath)

See Also