Function
Static Public Summary | ||
public |
colexicographical(compare: *): * Generates a binary colexicographical comparator from a binary comparator. |
|
public |
fixedcolexicographical(compare: *, length: *): * Generates a binary colexicographical comparator for fixed size arrays. |
|
public |
fixedlexicographical(compare: *, length: *): * Generates a binary lexicographical comparator for fixed size arrays. |
|
public |
lexicographical(compare: *): * Generates a binary lexicographical comparator from a binary comparator. |
|
public |
quasicolexicographical(compare: *): * Generates a binary quasicolexicographical comparator from a binary comparator. |
|
public |
quasilexicographical(compare: *): * Generates a binary quasilexicographical comparator from a binary comparator. |
|
public |
rangedcolexicographical(compare: *, begin: *, end: *): * Generates a binary colexicographical comparator for ranges of arrays. |
|
public |
rangedlexicographical(compare: *, begin: *, end: *): * Generates a binary lexicographical comparator for ranges of arrays. |
Static Public
public colexicographical(compare: *): * source
import colexicographical from '@total-order/lex/src/colexicographical.js'
Generates a binary colexicographical comparator from a binary comparator.
https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order
compare( a, b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
compare should express an increasing ordering
Params:
Name | Type | Attribute | Description |
compare | * |
Return:
* |
public fixedcolexicographical(compare: *, length: *): * source
import fixedcolexicographical from '@total-order/lex/src/fixed/fixedcolexicographical.js'
Generates a binary colexicographical comparator for fixed size arrays.
https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order
compare( a , b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
Params:
Name | Type | Attribute | Description |
compare | * | ||
length | * |
Return:
* |
public fixedlexicographical(compare: *, length: *): * source
import fixedlexicographical from '@total-order/lex/src/fixed/fixedlexicographical.js'
Generates a binary lexicographical comparator for fixed size arrays.
https://en.wikipedia.org/wiki/Lexicographical_order
compare( a , b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
Params:
Name | Type | Attribute | Description |
compare | * | ||
length | * |
Return:
* |
public lexicographical(compare: *): * source
import lexicographical from '@total-order/lex/src/lexicographical.js'
Generates a binary lexicographical comparator from a binary comparator.
https://en.wikipedia.org/wiki/Lexicographical_order
compare( a, b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
compare should express an increasing ordering
Params:
Name | Type | Attribute | Description |
compare | * |
Return:
* |
public quasicolexicographical(compare: *): * source
import quasicolexicographical from '@total-order/lex/src/quasi/quasicolexicographical.js'
Generates a binary quasicolexicographical comparator from a binary comparator.
https://en.wikipedia.org/wiki/Lexicographical_order#Quasi-lexicographic_order https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order
compare( a, b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
compare should express an increasing ordering
Params:
Name | Type | Attribute | Description |
compare | * |
Return:
* |
public quasilexicographical(compare: *): * source
import quasilexicographical from '@total-order/lex/src/quasi/quasilexicographical.js'
Generates a binary quasilexicographical comparator from a binary comparator.
https://en.wikipedia.org/wiki/Lexicographical_order#Quasi-lexicographic_order
compare( a, b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
compare should express an increasing ordering
Params:
Name | Type | Attribute | Description |
compare | * |
Return:
* |
public rangedcolexicographical(compare: *, begin: *, end: *): * source
import rangedcolexicographical from '@total-order/lex/src/ranged/rangedcolexicographical.js'
Generates a binary colexicographical comparator for ranges of arrays.
https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order
compare( a , b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
Params:
Name | Type | Attribute | Description |
compare | * | ||
begin | * | ||
end | * |
Return:
* |
public rangedlexicographical(compare: *, begin: *, end: *): * source
import rangedlexicographical from '@total-order/lex/src/ranged/rangedlexicographical.js'
Generates a binary lexicographical comparator for ranges of arrays.
https://en.wikipedia.org/wiki/Lexicographical_order
compare( a , b ) should always return
- a negative value if a < b
- a positive value if a > b
- zero if a === b
Params:
Name | Type | Attribute | Description |
compare | * | ||
begin | * | ||
end | * |
Return:
* |