Home Manual Reference Source

Function

Static Public Summary
public

accumulate(array: *, i: *, j: *)

O(M) time where M=j-i.

public

alloc(n: *)

public

compose(sigma: *, tau: *)

public

cumulativeHistogram(array: *, i: *, j: *, ch: *, offset: *)

O(M+N) time where N=j-i and M = ch.length - offset.

public

* digits(tuples: *, i: *, j: *, s: *, t: *)

public

fill(array: *, x: *, i: *, j: *)

public

histogram(array: *, i: *, j: *, output: *, offset: *)

O(N) time where N = j - i;

public

load(s: *, tuples: *, i: *, j: *, buffer: *)

public

loadLengths(tuples: *, i: *, N: *, buffer: *): *

public

permute(permutation: *, array: *, ai: *, aj: *, output: *, oi: *)

public

permuteInPlace(permutation: *, array: *)

public

rank(ch: Array, array: Array, i: Number, j: Number, permutation: Array)

O(n) time.

public

reset(array: *, i: *, j: *)

public

sort(k: *, M: *, tuples: *): *

public

sortArbitraryTuples(M: *, tuples: *, output: *): *

public

sortFixedLengthTuples(k: *, M: *, tuples: *, output: *, i: *, j: *): *

O(kM + kN) time where k is the number of digits per tuple, M is the radix, and N = j - i is the number of tuples.

public

sortInt16(array: *): *

public

sortInt32(array: *): *

public

sortInt8(array: *): *

public

O(M + N) time where M is the maximum length of a tuple, and N is the number of tuples.

public

sortUint8(array: *): *

public

stable(M: *, current: *, rest: *): *

O(kM + kN) time where k is the number of arrays, M is the radix, and N is the length of each array.

public

zeros(n: *)

Static Public

public accumulate(array: *, i: *, j: *) source

O(M) time where M=j-i.

Params:

NameTypeAttributeDescription
array *
i *
j *

public alloc(n: *) source

Params:

NameTypeAttributeDescription
n *

public compose(sigma: *, tau: *) source

Params:

NameTypeAttributeDescription
sigma *
tau *

public cumulativeHistogram(array: *, i: *, j: *, ch: *, offset: *) source

O(M+N) time where N=j-i and M = ch.length - offset.

Params:

NameTypeAttributeDescription
array *
i *
j *
ch *
offset *

public * digits(tuples: *, i: *, j: *, s: *, t: *) source

Params:

NameTypeAttributeDescription
tuples *
i *
j *
s *
t *

public fill(array: *, x: *, i: *, j: *) source

Params:

NameTypeAttributeDescription
array *
x *
i *
j *

public histogram(array: *, i: *, j: *, output: *, offset: *) source

O(N) time where N = j - i;

Params:

NameTypeAttributeDescription
array *
i *
j *
output *
offset *

public load(s: *, tuples: *, i: *, j: *, buffer: *) source

Params:

NameTypeAttributeDescription
s *
tuples *
i *
j *
buffer *

public loadLengths(tuples: *, i: *, N: *, buffer: *): * source

Params:

NameTypeAttributeDescription
tuples *
i *
N *
buffer *

Return:

*

public permute(permutation: *, array: *, ai: *, aj: *, output: *, oi: *) source

Params:

NameTypeAttributeDescription
permutation *
array *
ai *
aj *
output *
oi *

public permuteInPlace(permutation: *, array: *) source

Params:

NameTypeAttributeDescription
permutation *
array *

public rank(ch: Array, array: Array, i: Number, j: Number, permutation: Array) source

O(n) time.

Params:

NameTypeAttributeDescription
ch Array

The cumulative histogram of the input.

array Array

The input array to sort.

i Number

Inclusive left boundary of the array.

j Number

Non-inclusive right boundary of the array.

permutation Array

The output permutation.

public reset(array: *, i: *, j: *) source

Params:

NameTypeAttributeDescription
array *
i *
j *

public sort(k: *, M: *, tuples: *): * source

Params:

NameTypeAttributeDescription
k *
M *
tuples *

Return:

*

public sortArbitraryTuples(M: *, tuples: *, output: *): * source

Params:

NameTypeAttributeDescription
M *
tuples *
output *

Return:

*

public sortFixedLengthTuples(k: *, M: *, tuples: *, output: *, i: *, j: *): * source

O(kM + kN) time where k is the number of digits per tuple, M is the radix, and N = j - i is the number of tuples. The product kN corresponds to the input size.

Params:

NameTypeAttributeDescription
k *
M *
tuples *
output *
i *
j *

Return:

*

public sortInt16(array: *): * source

Params:

NameTypeAttributeDescription
array *

Return:

*

public sortInt32(array: *): * source

Params:

NameTypeAttributeDescription
array *

Return:

*

public sortInt8(array: *): * source

Params:

NameTypeAttributeDescription
array *

Return:

*

public sortTuplesByLength(tuples: *): undefined[] source

O(M + N) time where M is the maximum length of a tuple, and N is the number of tuples.

Params:

NameTypeAttributeDescription
tuples *

Return:

undefined[]

public sortUint8(array: *): * source

Params:

NameTypeAttributeDescription
array *

Return:

*

public stable(M: *, current: *, rest: *): * source

O(kM + kN) time where k is the number of arrays, M is the radix, and N is the length of each array. The product kN corresponds to the input size.

Params:

NameTypeAttributeDescription
M *
current *
rest *

Return:

*

public zeros(n: *) source

Params:

NameTypeAttributeDescription
n *