Index<T>.GetSlice Method

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

GetSlice(Slice) Returns a slice of the current index.
GetSlice(T, T) Returns a slice of the current sorted index.
GetSlice(Int32, Int32, Int32) Returns a slice of the current index.

Index<T>.GetSlice(Slice)

Returns a slice of the current index.
C#
public virtual Index<T> GetSlice(
	Slice slice
)

Parameters

slice  Slice
A Slice structure that specifies the elements to return.

Return Value

Index<T>
A new index of the same type.

Exceptions

ArgumentOutOfRangeException

One or more of the indexes in slice is less than zero or greater than or equal to the length of the index.

Index<T>.GetSlice(T, T)

Returns a slice of the current sorted index.
C#
public virtual Index<T> GetSlice(
	T startKey,
	T endKey
)

Parameters

startKey  T
The first key to be included in the new index.
endKey  T
The zero-based index of the last element in the new index.

Return Value

Index<T>
A new index of the same type.

Exceptions

KeyNotFoundException

startKey is not a key in the index.

-or-

endKey is not a key in the index.

InvalidOperationException

The index is not sorted.

Index<T>.GetSlice(Int32, Int32, Int32)

Returns a slice of the current index.
C#
public virtual Index<T> GetSlice(
	int startIndex,
	int endIndex,
	int stride
)

Parameters

startIndex  Int32
The zero-based index of the first element in the new index.
endIndex  Int32
The zero-based index of the last element in the new index.
stride  Int32
The number of items between elements in the new index.

Return Value

Index<T>
A new index of the same type.

Exceptions

ArgumentOutOfRangeException

startIndex is less than zero or greater than the length of the index.

-or-

endIndex is less than zero or greater than the length of the index.

See Also