Function
Static Public Summary | ||
public |
firstInversion(compare: Function, array: ArrayLike, left: number, right: number, pivots: number[], pi: number, pj: number): number Checks whether range [left,right[ of array is partitioned according to pivot p. |
|
public |
|
|
public |
isPartitioned(compare: Function, array: ArrayLike, left: number, right: number, pivots: number[], pi: number, pj: number): boolean Checks whether range [left,right[ of array is partitioned according to pivot p. |
|
public |
|
|
public |
whole(partition: *) |
|
public |
yaroslavskiy(compare: Function, a: Array, i: number, j: number): [number, number] |
Static Public
public firstInversion(compare: Function, array: ArrayLike, left: number, right: number, pivots: number[], pi: number, pj: number): number source
import firstInversion from '@comparison-sorting/partition/src/utils/firstInversion.js'
Checks whether range [left,right[ of array is partitioned according to pivot p. Returns the index of the first inversion.
public hoare(compare: Function, a: Array, i: number, j: number): number source
import hoare from '@comparison-sorting/partition/src/partition/hoare.js'
public isPartitioned(compare: Function, array: ArrayLike, left: number, right: number, pivots: number[], pi: number, pj: number): boolean source
import isPartitioned from '@comparison-sorting/partition/src/utils/isPartitioned.js'
Checks whether range [left,right[ of array is partitioned according to pivot p.
public lomuto(compare: Function, a: Array, i: number, j: number): number source
import lomuto from '@comparison-sorting/partition/src/partition/lomuto.js'
public whole(partition: *) source
import whole from '@comparison-sorting/partition/src/utils/whole.js'
Params:
Name | Type | Attribute | Description |
partition | * |