Function
Static Public Summary | ||
public |
sort(compare: *, a: *, i: *, j: *) |
|
public |
sortTypedDecreasing(a: *, i: *, j: *) |
|
public |
sortTypedDecreasingOptimized(a: *, i: *, j: *) Hyp: a[i-1] >= max(a[i:j]). |
|
public |
sortTypedIncreasing(a: *, i: *, j: *) |
|
public |
sortTypedIncreasingOptimized(a: *, i: *, j: *) Hyp: a[i-1] <= min(a[i:j]). |
Static Public
public sort(compare: *, a: *, i: *, j: *) source
import sort from '@comparison-sorting/insertion-sort/src/sort.js'
Params:
Name | Type | Attribute | Description |
compare | * | ||
a | * | ||
i | * | ||
j | * |
public sortTypedDecreasing(a: *, i: *, j: *) source
import sortTypedDecreasing from '@comparison-sorting/insertion-sort/src/sortTypedDecreasing.js'
Params:
Name | Type | Attribute | Description |
a | * | ||
i | * | ||
j | * |
public sortTypedDecreasingOptimized(a: *, i: *, j: *) source
import sortTypedDecreasingOptimized from '@comparison-sorting/insertion-sort/src/sortTypedDecreasingOptimized.js'
Hyp: a[i-1] >= max(a[i:j]).
Params:
Name | Type | Attribute | Description |
a | * | ||
i | * | ||
j | * |
public sortTypedIncreasing(a: *, i: *, j: *) source
import sortTypedIncreasing from '@comparison-sorting/insertion-sort/src/sortTypedIncreasing.js'
Params:
Name | Type | Attribute | Description |
a | * | ||
i | * | ||
j | * |
public sortTypedIncreasingOptimized(a: *, i: *, j: *) source
import sortTypedIncreasingOptimized from '@comparison-sorting/insertion-sort/src/sortTypedIncreasingOptimized.js'
Hyp: a[i-1] <= min(a[i:j]).
Params:
Name | Type | Attribute | Description |
a | * | ||
i | * | ||
j | * |