Permutation Class

Represents a permutation, a rearrangement of the elements of a set or collection.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public class Permutation
Inheritance
Object  →  Permutation

Remarks

Use the Permutation class to represent any rearrangement of the elements of a set or collection.

Constructors

Permutation(Int32) Constructs a new Permutation.
Permutation(Int32[]) Constructs a new permutation.

Properties

IsEven Gets whether the permutation is composed of an even number of elementary permutations.
IsIdentity Gets whether the permutation is the identity permutation.
Item Gets the position of an element after applying the permutation.
Length Gets the length of the permutation.

Methods

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.
ApplyInverseInPlace(IPermutable) Applies the inverse permutation to the components of a vector.
ApplyInverseInPlace<T>(T[]) Applies the permutation to the components of an array.
ApplyInverseInPlace<T>(IList<T>) Applies the inverse permutation to a list.
ApplyInverseInPlace<T>(Span<T>) Applies the permutation to a span.
Compose Returns the composition of two permutations.
CreateRandom Creates a new random permutation of the specified length.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetInverse Returns the inverse of this Permutation.
GetTypeGets the Type of the current instance.
(Inherited from Object)
Inverse Returns the position of an element after applying the inverse permutation.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Swap Applies an elementary permutation.
ToString Returns a String representation of the permutation.
(Overrides Object.ToString())

See Also