Permutation.ApplyInPlace Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

ApplyInPlace(Action<Int32, Int32>) Applies the permutation by swapping elements.
ApplyInPlace(IPermutable) Applies the permutation to the rows of a permutable object.
ApplyInPlace<T>(T[]) Applies the permutation to the components of an array.
ApplyInPlace<T>(IList<T>) Applies the permutation to a list.
ApplyInPlace<T>(Span<T>) Applies the permutation to a span.

ApplyInPlace(Action<Int32, Int32>)

Applies the permutation by swapping elements.
C#
public void ApplyInPlace(
	Action<int, int> swap
)

Parameters

swap  Action<Int32, Int32>
An Action<T1, T2> delegate that takes two integer indexes and swaps the elements at these indexes.

Exceptions

ApplyInPlace<T>(T[])

Applies the permutation to the components of an array.
C#
public void ApplyInPlace<T>(
	T[] array
)

Parameters

array  T[]
The array whose components are to be permuted.

Type Parameters

T

Exceptions

ArgumentNullException

array is null.

ApplyInPlace<T>(IList<T>)

Applies the permutation to a list.
C#
public void ApplyInPlace<T>(
	IList<T> list
)

Parameters

list  IList<T>
The list to be permuted.

Type Parameters

T
The type of the members of the list.

Remarks

The elements of list are rearranged according to the permutation.

Exceptions

ApplyInPlace(IPermutable)

Applies the permutation to the rows of a permutable object.
C#
public void ApplyInPlace(
	IPermutable permutableObject
)

Parameters

permutableObject  IPermutable
An object that implements IPermutable.

Exceptions

ArgumentNullException

permutableObject is null.

ApplyInPlace<T>(Span<T>)

Applies the permutation to a span.
C#
public void ApplyInPlace<T>(
	Span<T> span
)

Parameters

span  Span<T>
The span whose elements are to be permuted.

Type Parameters

T

Exceptions

See Also