Generated by DocFX

Class StableComparer<T>

Stable comparer for stable sorting algorithm.

Inheritance
System.Object
StableComparer<T>
Namespace: ISynergy.Framework.Mathematics.Comparers
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public class StableComparer<T> : IComparer<KeyValuePair<int, T>>
Type Parameters
Name Description
T

The type of objects to compare.

Remarks

This class helps sort the elements of an array without swapping elements which are already in order. This comprises a stable sorting algorithm.

Constructors

View Source

StableComparer(Comparison<T>)

Constructs a new instance of the StableComparer<T> class.

Declaration
public StableComparer(Comparison<T> comparison)
Parameters
Type Name Description
Comparison<T> comparison

The comparison function.

Methods

View Source

Compare(KeyValuePair<Int32, T>, KeyValuePair<Int32, T>)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Declaration
public int Compare(KeyValuePair<int, T> x, KeyValuePair<int, T> y)
Parameters
Type Name Description
KeyValuePair<System.Int32, T> x

The first object to compare.

KeyValuePair<System.Int32, T> y

The second object to compare.

Returns
Type Description
System.Int32

A signed integer that indicates the relative values of x and y.

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)

See Also

ElementComparer<T>
ArrayComparer<T>
GeneralComparer
CustomComparer<T>