wasm-bhtsne 1.0.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +41 -5
- package/package.json +5 -3
- package/snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js +107 -0
- package/wasm_bhtsne.d.ts +54 -154
- package/wasm_bhtsne.js +451 -493
- package/wasm_bhtsne_bg.wasm +0 -0
package/wasm_bhtsne.js
CHANGED
|
@@ -1,128 +1,13 @@
|
|
|
1
|
-
import { startWorkers } from './snippets/wasm-bindgen-rayon-
|
|
1
|
+
import { startWorkers } from './snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function getObject(idx) { return heap[idx]; }
|
|
10
|
-
|
|
11
|
-
let heap_next = heap.length;
|
|
12
|
-
|
|
13
|
-
function dropObject(idx) {
|
|
14
|
-
if (idx < 132) return;
|
|
15
|
-
heap[idx] = heap_next;
|
|
16
|
-
heap_next = idx;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function takeObject(idx) {
|
|
20
|
-
const ret = getObject(idx);
|
|
21
|
-
dropObject(idx);
|
|
22
|
-
return ret;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function isLikeNone(x) {
|
|
26
|
-
return x === undefined || x === null;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let cachedFloat64Memory0 = null;
|
|
30
|
-
|
|
31
|
-
function getFloat64Memory0() {
|
|
32
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.buffer !== wasm.memory.buffer) {
|
|
33
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
34
|
-
}
|
|
35
|
-
return cachedFloat64Memory0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
let cachedInt32Memory0 = null;
|
|
39
|
-
|
|
40
|
-
function getInt32Memory0() {
|
|
41
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
42
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
43
|
-
}
|
|
44
|
-
return cachedInt32Memory0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function addHeapObject(obj) {
|
|
48
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
49
|
-
const idx = heap_next;
|
|
50
|
-
heap_next = heap[idx];
|
|
51
|
-
|
|
52
|
-
heap[idx] = obj;
|
|
5
|
+
function addToExternrefTable0(obj) {
|
|
6
|
+
const idx = wasm.__externref_table_alloc();
|
|
7
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
53
8
|
return idx;
|
|
54
9
|
}
|
|
55
10
|
|
|
56
|
-
let WASM_VECTOR_LEN = 0;
|
|
57
|
-
|
|
58
|
-
let cachedUint8Memory0 = null;
|
|
59
|
-
|
|
60
|
-
function getUint8Memory0() {
|
|
61
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
62
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
63
|
-
}
|
|
64
|
-
return cachedUint8Memory0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
68
|
-
|
|
69
|
-
const encodeString = function (arg, view) {
|
|
70
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
71
|
-
view.set(buf);
|
|
72
|
-
return {
|
|
73
|
-
read: arg.length,
|
|
74
|
-
written: buf.length
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
79
|
-
|
|
80
|
-
if (realloc === undefined) {
|
|
81
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
82
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
83
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
84
|
-
WASM_VECTOR_LEN = buf.length;
|
|
85
|
-
return ptr;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
let len = arg.length;
|
|
89
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
90
|
-
|
|
91
|
-
const mem = getUint8Memory0();
|
|
92
|
-
|
|
93
|
-
let offset = 0;
|
|
94
|
-
|
|
95
|
-
for (; offset < len; offset++) {
|
|
96
|
-
const code = arg.charCodeAt(offset);
|
|
97
|
-
if (code > 0x7F) break;
|
|
98
|
-
mem[ptr + offset] = code;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (offset !== len) {
|
|
102
|
-
if (offset !== 0) {
|
|
103
|
-
arg = arg.slice(offset);
|
|
104
|
-
}
|
|
105
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
106
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
107
|
-
const ret = encodeString(arg, view);
|
|
108
|
-
|
|
109
|
-
offset += ret.written;
|
|
110
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
WASM_VECTOR_LEN = offset;
|
|
114
|
-
return ptr;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
118
|
-
|
|
119
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
120
|
-
|
|
121
|
-
function getStringFromWasm0(ptr, len) {
|
|
122
|
-
ptr = ptr >>> 0;
|
|
123
|
-
return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
11
|
function debugString(val) {
|
|
127
12
|
// primitive types
|
|
128
13
|
const type = typeof val;
|
|
@@ -164,7 +49,7 @@ function debugString(val) {
|
|
|
164
49
|
// Test for built-in
|
|
165
50
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
166
51
|
let className;
|
|
167
|
-
if (builtInMatches.length > 1) {
|
|
52
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
168
53
|
className = builtInMatches[1];
|
|
169
54
|
} else {
|
|
170
55
|
// Failed to match the standard '[object ClassName]'
|
|
@@ -188,200 +73,224 @@ function debugString(val) {
|
|
|
188
73
|
return className;
|
|
189
74
|
}
|
|
190
75
|
|
|
76
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
77
|
+
ptr = ptr >>> 0;
|
|
78
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
let cachedDataViewMemory0 = null;
|
|
82
|
+
function getDataViewMemory0() {
|
|
83
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
84
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
85
|
+
}
|
|
86
|
+
return cachedDataViewMemory0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function getStringFromWasm0(ptr, len) {
|
|
90
|
+
ptr = ptr >>> 0;
|
|
91
|
+
return decodeText(ptr, len);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
let cachedUint8ArrayMemory0 = null;
|
|
95
|
+
function getUint8ArrayMemory0() {
|
|
96
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
97
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
98
|
+
}
|
|
99
|
+
return cachedUint8ArrayMemory0;
|
|
100
|
+
}
|
|
101
|
+
|
|
191
102
|
function handleError(f, args) {
|
|
192
103
|
try {
|
|
193
104
|
return f.apply(this, args);
|
|
194
105
|
} catch (e) {
|
|
195
|
-
|
|
106
|
+
const idx = addToExternrefTable0(e);
|
|
107
|
+
wasm.__wbindgen_exn_store(idx);
|
|
196
108
|
}
|
|
197
109
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
*/
|
|
202
|
-
export function initThreadPool(num_threads) {
|
|
203
|
-
const ret = wasm.initThreadPool(num_threads);
|
|
204
|
-
return takeObject(ret);
|
|
110
|
+
|
|
111
|
+
function isLikeNone(x) {
|
|
112
|
+
return x === undefined || x === null;
|
|
205
113
|
}
|
|
206
114
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
115
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
116
|
+
if (realloc === undefined) {
|
|
117
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
118
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
119
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
120
|
+
WASM_VECTOR_LEN = buf.length;
|
|
121
|
+
return ptr;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
let len = arg.length;
|
|
125
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
126
|
+
|
|
127
|
+
const mem = getUint8ArrayMemory0();
|
|
128
|
+
|
|
129
|
+
let offset = 0;
|
|
130
|
+
|
|
131
|
+
for (; offset < len; offset++) {
|
|
132
|
+
const code = arg.charCodeAt(offset);
|
|
133
|
+
if (code > 0x7F) break;
|
|
134
|
+
mem[ptr + offset] = code;
|
|
135
|
+
}
|
|
136
|
+
if (offset !== len) {
|
|
137
|
+
if (offset !== 0) {
|
|
138
|
+
arg = arg.slice(offset);
|
|
139
|
+
}
|
|
140
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
141
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
142
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
143
|
+
|
|
144
|
+
offset += ret.written;
|
|
145
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
WASM_VECTOR_LEN = offset;
|
|
149
|
+
return ptr;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function takeFromExternrefTable0(idx) {
|
|
153
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
154
|
+
wasm.__externref_table_dealloc(idx);
|
|
155
|
+
return value;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : undefined);
|
|
159
|
+
if (cachedTextDecoder) cachedTextDecoder.decode();
|
|
160
|
+
|
|
161
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
162
|
+
let numBytesDecoded = 0;
|
|
163
|
+
function decodeText(ptr, len) {
|
|
164
|
+
numBytesDecoded += len;
|
|
165
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
166
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
167
|
+
cachedTextDecoder.decode();
|
|
168
|
+
numBytesDecoded = len;
|
|
169
|
+
}
|
|
170
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined);
|
|
174
|
+
|
|
175
|
+
if (cachedTextEncoder) {
|
|
176
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
177
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
178
|
+
view.set(buf);
|
|
179
|
+
return {
|
|
180
|
+
read: arg.length,
|
|
181
|
+
written: buf.length
|
|
182
|
+
};
|
|
183
|
+
}
|
|
212
184
|
}
|
|
213
185
|
|
|
214
|
-
|
|
186
|
+
let WASM_VECTOR_LEN = 0;
|
|
187
|
+
|
|
188
|
+
const bhtSNEf32Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
215
189
|
? { register: () => {}, unregister: () => {} }
|
|
216
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
export class bhtSNE {
|
|
190
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bhtsnef32_free(ptr >>> 0, 1));
|
|
191
|
+
|
|
192
|
+
const bhtSNEf64Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
193
|
+
? { register: () => {}, unregister: () => {} }
|
|
194
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bhtsnef64_free(ptr >>> 0, 1));
|
|
222
195
|
|
|
196
|
+
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
197
|
+
? { register: () => {}, unregister: () => {} }
|
|
198
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* t-distributed stochastic neighbor embedding. Provides a parallel implementation of both the
|
|
202
|
+
* exact version of the algorithm and the tree accelerated one leveraging space partitioning trees.
|
|
203
|
+
*/
|
|
204
|
+
export class bhtSNEf32 {
|
|
223
205
|
__destroy_into_raw() {
|
|
224
206
|
const ptr = this.__wbg_ptr;
|
|
225
207
|
this.__wbg_ptr = 0;
|
|
226
|
-
|
|
208
|
+
bhtSNEf32Finalization.unregister(this);
|
|
227
209
|
return ptr;
|
|
228
210
|
}
|
|
229
|
-
|
|
230
211
|
free() {
|
|
231
212
|
const ptr = this.__destroy_into_raw();
|
|
232
|
-
wasm.
|
|
213
|
+
wasm.__wbg_bhtsnef32_free(ptr, 0);
|
|
233
214
|
}
|
|
234
215
|
/**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
216
|
+
* @param {any} data
|
|
217
|
+
* @param {any} opt
|
|
218
|
+
*/
|
|
219
|
+
constructor(data, opt) {
|
|
220
|
+
const ret = wasm.bhtsnef32_new(data, opt);
|
|
239
221
|
this.__wbg_ptr = ret >>> 0;
|
|
222
|
+
bhtSNEf32Finalization.register(this, this.__wbg_ptr, this);
|
|
240
223
|
return this;
|
|
241
224
|
}
|
|
242
225
|
/**
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
226
|
+
* Performs a parallel Barnes-Hut approximation of the t-SNE algorithm.
|
|
227
|
+
*
|
|
228
|
+
* # Arguments
|
|
229
|
+
*
|
|
230
|
+
* `epochs` - the maximum number of fitting iterations. Must be positive
|
|
231
|
+
* @param {number} epochs
|
|
232
|
+
* @returns {any}
|
|
233
|
+
*/
|
|
251
234
|
step(epochs) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
256
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
257
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
258
|
-
if (r2) {
|
|
259
|
-
throw takeObject(r1);
|
|
260
|
-
}
|
|
261
|
-
return takeObject(r0);
|
|
262
|
-
} finally {
|
|
263
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
235
|
+
const ret = wasm.bhtsnef32_step(this.__wbg_ptr, epochs);
|
|
236
|
+
if (ret[2]) {
|
|
237
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
264
238
|
}
|
|
239
|
+
return takeFromExternrefTable0(ret[0]);
|
|
265
240
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
wasm.bhtsne_learning_rate(this.__wbg_ptr, learning_rate);
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Sets new epochs, i.e the maximum number of fitting iterations.
|
|
279
|
-
*
|
|
280
|
-
* # Arguments
|
|
281
|
-
*
|
|
282
|
-
* `epochs` - new value for the epochs.
|
|
283
|
-
* @param {number} epochs
|
|
284
|
-
*/
|
|
285
|
-
epochs(epochs) {
|
|
286
|
-
wasm.bhtsne_epochs(this.__wbg_ptr, epochs);
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* Sets a new momentum.
|
|
290
|
-
*
|
|
291
|
-
* # Arguments
|
|
292
|
-
*
|
|
293
|
-
* `momentum` - new value for the momentum.
|
|
294
|
-
* @param {number} momentum
|
|
295
|
-
*/
|
|
296
|
-
momentum(momentum) {
|
|
297
|
-
wasm.bhtsne_momentum(this.__wbg_ptr, momentum);
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Sets a new final momentum.
|
|
301
|
-
*
|
|
302
|
-
* # Arguments
|
|
303
|
-
*
|
|
304
|
-
* `final_momentum` - new value for the final momentum.
|
|
305
|
-
* @param {number} final_momentum
|
|
306
|
-
*/
|
|
307
|
-
final_momentum(final_momentum) {
|
|
308
|
-
wasm.bhtsne_final_momentum(this.__wbg_ptr, final_momentum);
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Sets a new momentum switch epoch, i.e. the epoch after which the algorithm switches to
|
|
312
|
-
* `final_momentum` for the map update.
|
|
313
|
-
*
|
|
314
|
-
* # Arguments
|
|
315
|
-
*
|
|
316
|
-
* `momentum_switch_epoch` - new value for the momentum switch epoch.
|
|
317
|
-
* @param {number} momentum_switch_epoch
|
|
318
|
-
*/
|
|
319
|
-
momentum_switch_epoch(momentum_switch_epoch) {
|
|
320
|
-
wasm.bhtsne_momentum_switch_epoch(this.__wbg_ptr, momentum_switch_epoch);
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* Sets a new stop lying epoch, i.e. the epoch after which the P distribution values become
|
|
324
|
-
* true, as defined in the original implementation. For epochs < `stop_lying_epoch` the values
|
|
325
|
-
* of the P distribution are multiplied by a factor equal to `12.0`.
|
|
326
|
-
*
|
|
327
|
-
* # Arguments
|
|
328
|
-
*
|
|
329
|
-
* `stop_lying_epoch` - new value for the stop lying epoch.
|
|
330
|
-
* @param {number} stop_lying_epoch
|
|
331
|
-
*/
|
|
332
|
-
stop_lying_epoch(stop_lying_epoch) {
|
|
333
|
-
wasm.bhtsne_stop_lying_epoch(this.__wbg_ptr, stop_lying_epoch);
|
|
241
|
+
}
|
|
242
|
+
if (Symbol.dispose) bhtSNEf32.prototype[Symbol.dispose] = bhtSNEf32.prototype.free;
|
|
243
|
+
|
|
244
|
+
export class bhtSNEf64 {
|
|
245
|
+
__destroy_into_raw() {
|
|
246
|
+
const ptr = this.__wbg_ptr;
|
|
247
|
+
this.__wbg_ptr = 0;
|
|
248
|
+
bhtSNEf64Finalization.unregister(this);
|
|
249
|
+
return ptr;
|
|
334
250
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
* For small values of θ it is less probable that a cell in the space partitioning tree will
|
|
339
|
-
* be treated as a single point. For θ equal to 0.0 the method degenerates in the exact
|
|
340
|
-
* version.
|
|
341
|
-
*
|
|
342
|
-
* # Arguments
|
|
343
|
-
*
|
|
344
|
-
* * `theta` - new value for the theta.
|
|
345
|
-
* @param {number} theta
|
|
346
|
-
*/
|
|
347
|
-
theta(theta) {
|
|
348
|
-
wasm.bhtsne_theta(this.__wbg_ptr, theta);
|
|
251
|
+
free() {
|
|
252
|
+
const ptr = this.__destroy_into_raw();
|
|
253
|
+
wasm.__wbg_bhtsnef64_free(ptr, 0);
|
|
349
254
|
}
|
|
350
255
|
/**
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
wasm.bhtsne_embedding_dim(this.__wbg_ptr, embedding_dim);
|
|
256
|
+
* @param {any} data
|
|
257
|
+
* @param {any} opt
|
|
258
|
+
*/
|
|
259
|
+
constructor(data, opt) {
|
|
260
|
+
const ret = wasm.bhtsnef64_new(data, opt);
|
|
261
|
+
this.__wbg_ptr = ret >>> 0;
|
|
262
|
+
bhtSNEf64Finalization.register(this, this.__wbg_ptr, this);
|
|
263
|
+
return this;
|
|
360
264
|
}
|
|
361
265
|
/**
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
266
|
+
* Performs a parallel Barnes-Hut approximation of the t-SNE algorithm.
|
|
267
|
+
*
|
|
268
|
+
* # Arguments
|
|
269
|
+
*
|
|
270
|
+
* `epochs` - Sets epochs, the maximum number of fitting iterations.
|
|
271
|
+
* @param {number} epochs
|
|
272
|
+
* @returns {any}
|
|
273
|
+
*/
|
|
274
|
+
step(epochs) {
|
|
275
|
+
const ret = wasm.bhtsnef64_step(this.__wbg_ptr, epochs);
|
|
276
|
+
if (ret[2]) {
|
|
277
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
278
|
+
}
|
|
279
|
+
return takeFromExternrefTable0(ret[0]);
|
|
375
280
|
}
|
|
376
281
|
}
|
|
282
|
+
if (Symbol.dispose) bhtSNEf64.prototype[Symbol.dispose] = bhtSNEf64.prototype.free;
|
|
377
283
|
|
|
378
|
-
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
379
|
-
? { register: () => {}, unregister: () => {} }
|
|
380
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0));
|
|
381
284
|
/**
|
|
382
|
-
|
|
383
|
-
|
|
285
|
+
* @param {number} num_threads
|
|
286
|
+
* @returns {Promise<any>}
|
|
287
|
+
*/
|
|
288
|
+
export function initThreadPool(num_threads) {
|
|
289
|
+
const ret = wasm.initThreadPool(num_threads);
|
|
290
|
+
return ret;
|
|
291
|
+
}
|
|
384
292
|
|
|
293
|
+
export class wbg_rayon_PoolBuilder {
|
|
385
294
|
static __wrap(ptr) {
|
|
386
295
|
ptr = ptr >>> 0;
|
|
387
296
|
const obj = Object.create(wbg_rayon_PoolBuilder.prototype);
|
|
@@ -389,48 +298,55 @@ export class wbg_rayon_PoolBuilder {
|
|
|
389
298
|
wbg_rayon_PoolBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
390
299
|
return obj;
|
|
391
300
|
}
|
|
392
|
-
|
|
393
301
|
__destroy_into_raw() {
|
|
394
302
|
const ptr = this.__wbg_ptr;
|
|
395
303
|
this.__wbg_ptr = 0;
|
|
396
304
|
wbg_rayon_PoolBuilderFinalization.unregister(this);
|
|
397
305
|
return ptr;
|
|
398
306
|
}
|
|
399
|
-
|
|
400
307
|
free() {
|
|
401
308
|
const ptr = this.__destroy_into_raw();
|
|
402
|
-
wasm.__wbg_wbg_rayon_poolbuilder_free(ptr);
|
|
309
|
+
wasm.__wbg_wbg_rayon_poolbuilder_free(ptr, 0);
|
|
403
310
|
}
|
|
404
311
|
/**
|
|
405
|
-
|
|
406
|
-
|
|
312
|
+
* @returns {number}
|
|
313
|
+
*/
|
|
407
314
|
numThreads() {
|
|
408
315
|
const ret = wasm.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr);
|
|
409
316
|
return ret >>> 0;
|
|
410
317
|
}
|
|
318
|
+
build() {
|
|
319
|
+
wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
|
|
320
|
+
}
|
|
411
321
|
/**
|
|
412
|
-
|
|
413
|
-
|
|
322
|
+
* @returns {number}
|
|
323
|
+
*/
|
|
414
324
|
receiver() {
|
|
415
325
|
const ret = wasm.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr);
|
|
416
326
|
return ret >>> 0;
|
|
417
327
|
}
|
|
418
|
-
/**
|
|
419
|
-
*/
|
|
420
|
-
build() {
|
|
421
|
-
wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
|
|
422
|
-
}
|
|
423
328
|
}
|
|
329
|
+
if (Symbol.dispose) wbg_rayon_PoolBuilder.prototype[Symbol.dispose] = wbg_rayon_PoolBuilder.prototype.free;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @param {number} receiver
|
|
333
|
+
*/
|
|
334
|
+
export function wbg_rayon_start_worker(receiver) {
|
|
335
|
+
wasm.wbg_rayon_start_worker(receiver);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
424
339
|
|
|
425
340
|
async function __wbg_load(module, imports) {
|
|
426
341
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
427
342
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
428
343
|
try {
|
|
429
344
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
430
|
-
|
|
431
345
|
} catch (e) {
|
|
432
|
-
|
|
433
|
-
|
|
346
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
347
|
+
|
|
348
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
349
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
434
350
|
|
|
435
351
|
} else {
|
|
436
352
|
throw e;
|
|
@@ -440,314 +356,356 @@ async function __wbg_load(module, imports) {
|
|
|
440
356
|
|
|
441
357
|
const bytes = await module.arrayBuffer();
|
|
442
358
|
return await WebAssembly.instantiate(bytes, imports);
|
|
443
|
-
|
|
444
359
|
} else {
|
|
445
360
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
446
361
|
|
|
447
362
|
if (instance instanceof WebAssembly.Instance) {
|
|
448
363
|
return { instance, module };
|
|
449
|
-
|
|
450
364
|
} else {
|
|
451
365
|
return instance;
|
|
452
366
|
}
|
|
453
367
|
}
|
|
454
368
|
}
|
|
455
369
|
|
|
456
|
-
function __wbg_get_imports() {
|
|
370
|
+
function __wbg_get_imports(memory) {
|
|
457
371
|
const imports = {};
|
|
458
372
|
imports.wbg = {};
|
|
459
|
-
imports.wbg.
|
|
460
|
-
|
|
373
|
+
imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
374
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
375
|
+
return ret;
|
|
461
376
|
};
|
|
462
|
-
imports.wbg.
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
377
|
+
imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
|
|
378
|
+
const ret = Number(arg0);
|
|
379
|
+
return ret;
|
|
380
|
+
};
|
|
381
|
+
imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
|
|
382
|
+
const v = arg1;
|
|
383
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
384
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
385
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
386
|
+
};
|
|
387
|
+
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
388
|
+
const v = arg0;
|
|
389
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
390
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
391
|
+
};
|
|
392
|
+
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
393
|
+
const ret = debugString(arg1);
|
|
394
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
395
|
+
const len1 = WASM_VECTOR_LEN;
|
|
396
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
397
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
398
|
+
};
|
|
399
|
+
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
400
|
+
const ret = arg0 in arg1;
|
|
401
|
+
return ret;
|
|
402
|
+
};
|
|
403
|
+
imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
404
|
+
const ret = typeof(arg0) === 'bigint';
|
|
405
|
+
return ret;
|
|
467
406
|
};
|
|
468
|
-
imports.wbg.
|
|
469
|
-
const ret =
|
|
470
|
-
return
|
|
407
|
+
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
408
|
+
const ret = typeof(arg0) === 'function';
|
|
409
|
+
return ret;
|
|
471
410
|
};
|
|
472
|
-
imports.wbg.
|
|
473
|
-
const val =
|
|
411
|
+
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
412
|
+
const val = arg0;
|
|
474
413
|
const ret = typeof(val) === 'object' && val !== null;
|
|
475
414
|
return ret;
|
|
476
415
|
};
|
|
477
|
-
imports.wbg.
|
|
478
|
-
const ret =
|
|
416
|
+
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
417
|
+
const ret = typeof(arg0) === 'string';
|
|
479
418
|
return ret;
|
|
480
419
|
};
|
|
481
|
-
imports.wbg.
|
|
482
|
-
const
|
|
483
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
420
|
+
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
421
|
+
const ret = arg0 === undefined;
|
|
484
422
|
return ret;
|
|
485
423
|
};
|
|
486
|
-
imports.wbg.
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
490
|
-
var len1 = WASM_VECTOR_LEN;
|
|
491
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
492
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
424
|
+
imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
425
|
+
const ret = arg0 === arg1;
|
|
426
|
+
return ret;
|
|
493
427
|
};
|
|
494
|
-
imports.wbg.
|
|
495
|
-
const ret =
|
|
496
|
-
return
|
|
428
|
+
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
429
|
+
const ret = arg0 == arg1;
|
|
430
|
+
return ret;
|
|
497
431
|
};
|
|
498
|
-
imports.wbg.
|
|
499
|
-
const ret =
|
|
500
|
-
return
|
|
432
|
+
imports.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
|
|
433
|
+
const ret = wasm.memory;
|
|
434
|
+
return ret;
|
|
501
435
|
};
|
|
502
|
-
imports.wbg.
|
|
503
|
-
const ret =
|
|
504
|
-
return
|
|
436
|
+
imports.wbg.__wbg___wbindgen_module_967adef62ea6cbf8 = function() {
|
|
437
|
+
const ret = __wbg_init.__wbindgen_wasm_module;
|
|
438
|
+
return ret;
|
|
505
439
|
};
|
|
506
|
-
imports.wbg.
|
|
507
|
-
const
|
|
508
|
-
|
|
440
|
+
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
441
|
+
const obj = arg1;
|
|
442
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
443
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
444
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
509
445
|
};
|
|
510
|
-
imports.wbg.
|
|
511
|
-
const
|
|
512
|
-
|
|
446
|
+
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
447
|
+
const obj = arg1;
|
|
448
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
449
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
450
|
+
var len1 = WASM_VECTOR_LEN;
|
|
451
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
452
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
513
453
|
};
|
|
514
|
-
imports.wbg.
|
|
515
|
-
|
|
516
|
-
return addHeapObject(ret);
|
|
454
|
+
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
455
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
517
456
|
};
|
|
518
|
-
imports.wbg.
|
|
519
|
-
const ret =
|
|
520
|
-
return
|
|
457
|
+
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
458
|
+
const ret = arg0.call(arg1, arg2);
|
|
459
|
+
return ret;
|
|
460
|
+
}, arguments) };
|
|
461
|
+
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
462
|
+
const ret = arg0.call(arg1);
|
|
463
|
+
return ret;
|
|
464
|
+
}, arguments) };
|
|
465
|
+
imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
466
|
+
const ret = arg0.crypto;
|
|
467
|
+
return ret;
|
|
521
468
|
};
|
|
522
|
-
imports.wbg.
|
|
523
|
-
const ret =
|
|
469
|
+
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
470
|
+
const ret = arg0.done;
|
|
524
471
|
return ret;
|
|
525
472
|
};
|
|
526
|
-
imports.wbg.
|
|
527
|
-
|
|
528
|
-
return addHeapObject(ret);
|
|
473
|
+
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
474
|
+
arg0.getRandomValues(arg1);
|
|
529
475
|
}, arguments) };
|
|
530
|
-
imports.wbg.
|
|
531
|
-
const ret =
|
|
532
|
-
return
|
|
476
|
+
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
477
|
+
const ret = arg0[arg1 >>> 0];
|
|
478
|
+
return ret;
|
|
533
479
|
};
|
|
534
|
-
imports.wbg.
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {
|
|
538
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
480
|
+
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
481
|
+
const ret = Reflect.get(arg0, arg1);
|
|
482
|
+
return ret;
|
|
539
483
|
}, arguments) };
|
|
540
|
-
imports.wbg.
|
|
484
|
+
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
485
|
+
const ret = arg0[arg1];
|
|
486
|
+
return ret;
|
|
487
|
+
};
|
|
488
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
541
489
|
let result;
|
|
542
490
|
try {
|
|
543
|
-
result =
|
|
491
|
+
result = arg0 instanceof ArrayBuffer;
|
|
544
492
|
} catch (_) {
|
|
545
493
|
result = false;
|
|
546
494
|
}
|
|
547
495
|
const ret = result;
|
|
548
496
|
return ret;
|
|
549
497
|
};
|
|
550
|
-
imports.wbg.
|
|
551
|
-
|
|
552
|
-
|
|
498
|
+
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
499
|
+
let result;
|
|
500
|
+
try {
|
|
501
|
+
result = arg0 instanceof Uint8Array;
|
|
502
|
+
} catch (_) {
|
|
503
|
+
result = false;
|
|
504
|
+
}
|
|
505
|
+
const ret = result;
|
|
506
|
+
return ret;
|
|
553
507
|
};
|
|
554
|
-
imports.wbg.
|
|
555
|
-
|
|
508
|
+
imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
|
|
509
|
+
let result;
|
|
510
|
+
try {
|
|
511
|
+
result = arg0 instanceof Window;
|
|
512
|
+
} catch (_) {
|
|
513
|
+
result = false;
|
|
514
|
+
}
|
|
515
|
+
const ret = result;
|
|
556
516
|
return ret;
|
|
557
517
|
};
|
|
558
|
-
imports.wbg.
|
|
559
|
-
const ret =
|
|
560
|
-
return
|
|
518
|
+
imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
519
|
+
const ret = Array.isArray(arg0);
|
|
520
|
+
return ret;
|
|
561
521
|
};
|
|
562
|
-
imports.wbg.
|
|
563
|
-
const ret =
|
|
522
|
+
imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
523
|
+
const ret = Number.isSafeInteger(arg0);
|
|
564
524
|
return ret;
|
|
565
525
|
};
|
|
566
|
-
imports.wbg.
|
|
567
|
-
const ret =
|
|
568
|
-
return
|
|
526
|
+
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
527
|
+
const ret = Symbol.iterator;
|
|
528
|
+
return ret;
|
|
569
529
|
};
|
|
570
|
-
imports.wbg.
|
|
571
|
-
const ret =
|
|
572
|
-
return
|
|
530
|
+
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
531
|
+
const ret = arg0.length;
|
|
532
|
+
return ret;
|
|
573
533
|
};
|
|
574
|
-
imports.wbg.
|
|
575
|
-
const ret =
|
|
576
|
-
return addHeapObject(ret);
|
|
577
|
-
}, arguments) };
|
|
578
|
-
imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
|
|
579
|
-
const ret = getObject(arg0).done;
|
|
534
|
+
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
535
|
+
const ret = arg0.length;
|
|
580
536
|
return ret;
|
|
581
537
|
};
|
|
582
|
-
imports.wbg.
|
|
583
|
-
const ret =
|
|
584
|
-
return
|
|
538
|
+
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
539
|
+
const ret = arg0.msCrypto;
|
|
540
|
+
return ret;
|
|
585
541
|
};
|
|
586
|
-
imports.wbg.
|
|
587
|
-
const ret =
|
|
588
|
-
return
|
|
542
|
+
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
543
|
+
const ret = new Array();
|
|
544
|
+
return ret;
|
|
589
545
|
};
|
|
590
|
-
imports.wbg.
|
|
591
|
-
const ret =
|
|
592
|
-
return addHeapObject(ret);
|
|
593
|
-
}, arguments) };
|
|
594
|
-
imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
|
|
595
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
596
|
-
return addHeapObject(ret);
|
|
597
|
-
}, arguments) };
|
|
598
|
-
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
599
|
-
const ret = self.self;
|
|
600
|
-
return addHeapObject(ret);
|
|
601
|
-
}, arguments) };
|
|
602
|
-
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
|
|
603
|
-
const ret = window.window;
|
|
604
|
-
return addHeapObject(ret);
|
|
605
|
-
}, arguments) };
|
|
606
|
-
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
|
|
607
|
-
const ret = globalThis.globalThis;
|
|
608
|
-
return addHeapObject(ret);
|
|
609
|
-
}, arguments) };
|
|
610
|
-
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
|
|
611
|
-
const ret = global.global;
|
|
612
|
-
return addHeapObject(ret);
|
|
613
|
-
}, arguments) };
|
|
614
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
615
|
-
const ret = getObject(arg0) === undefined;
|
|
546
|
+
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
547
|
+
const ret = new Uint8Array(arg0);
|
|
616
548
|
return ret;
|
|
617
549
|
};
|
|
618
|
-
imports.wbg.
|
|
619
|
-
|
|
550
|
+
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
551
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
552
|
+
return ret;
|
|
620
553
|
};
|
|
621
|
-
imports.wbg.
|
|
622
|
-
const ret =
|
|
554
|
+
imports.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
|
|
555
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
623
556
|
return ret;
|
|
624
557
|
};
|
|
625
|
-
imports.wbg.
|
|
626
|
-
|
|
627
|
-
try {
|
|
628
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
629
|
-
} catch (_) {
|
|
630
|
-
result = false;
|
|
631
|
-
}
|
|
632
|
-
const ret = result;
|
|
558
|
+
imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
559
|
+
const ret = arg0.next;
|
|
633
560
|
return ret;
|
|
634
561
|
};
|
|
635
|
-
imports.wbg.
|
|
636
|
-
const ret =
|
|
637
|
-
return
|
|
562
|
+
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
563
|
+
const ret = arg0.next();
|
|
564
|
+
return ret;
|
|
638
565
|
}, arguments) };
|
|
639
|
-
imports.wbg.
|
|
640
|
-
const ret =
|
|
641
|
-
return
|
|
566
|
+
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
567
|
+
const ret = arg0.node;
|
|
568
|
+
return ret;
|
|
642
569
|
};
|
|
643
|
-
imports.wbg.
|
|
644
|
-
const ret =
|
|
645
|
-
return
|
|
570
|
+
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
571
|
+
const ret = arg0.process;
|
|
572
|
+
return ret;
|
|
646
573
|
};
|
|
647
|
-
imports.wbg.
|
|
648
|
-
|
|
649
|
-
return addHeapObject(ret);
|
|
574
|
+
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
575
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
650
576
|
};
|
|
651
|
-
imports.wbg.
|
|
652
|
-
|
|
577
|
+
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
578
|
+
arg0.randomFillSync(arg1);
|
|
579
|
+
}, arguments) };
|
|
580
|
+
imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
581
|
+
const ret = module.require;
|
|
582
|
+
return ret;
|
|
583
|
+
}, arguments) };
|
|
584
|
+
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
585
|
+
arg0[arg1 >>> 0] = arg2;
|
|
653
586
|
};
|
|
654
|
-
imports.wbg.
|
|
655
|
-
const ret =
|
|
587
|
+
imports.wbg.__wbg_startWorkers_2ca11761e08ff5d5 = function(arg0, arg1, arg2) {
|
|
588
|
+
const ret = startWorkers(arg0, arg1, wbg_rayon_PoolBuilder.__wrap(arg2));
|
|
656
589
|
return ret;
|
|
657
590
|
};
|
|
658
|
-
imports.wbg.
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
591
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
592
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
593
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
594
|
+
};
|
|
595
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
596
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
597
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
598
|
+
};
|
|
599
|
+
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
600
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
601
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
602
|
+
};
|
|
603
|
+
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
604
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
605
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
606
|
+
};
|
|
607
|
+
imports.wbg.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
|
|
608
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
666
609
|
return ret;
|
|
667
610
|
};
|
|
668
|
-
imports.wbg.
|
|
669
|
-
const ret =
|
|
670
|
-
return
|
|
611
|
+
imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
612
|
+
const ret = arg0.value;
|
|
613
|
+
return ret;
|
|
671
614
|
};
|
|
672
|
-
imports.wbg.
|
|
673
|
-
const ret =
|
|
674
|
-
return
|
|
615
|
+
imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
616
|
+
const ret = arg0.versions;
|
|
617
|
+
return ret;
|
|
675
618
|
};
|
|
676
|
-
imports.wbg.
|
|
677
|
-
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
681
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
619
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
620
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
621
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
622
|
+
return ret;
|
|
682
623
|
};
|
|
683
|
-
imports.wbg.
|
|
684
|
-
|
|
624
|
+
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
625
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
626
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
627
|
+
return ret;
|
|
685
628
|
};
|
|
686
|
-
imports.wbg.
|
|
687
|
-
|
|
688
|
-
|
|
629
|
+
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
630
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
631
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
632
|
+
return ret;
|
|
689
633
|
};
|
|
690
|
-
imports.wbg.
|
|
691
|
-
|
|
692
|
-
|
|
634
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
635
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
636
|
+
const ret = arg0;
|
|
637
|
+
return ret;
|
|
693
638
|
};
|
|
694
|
-
imports.wbg.
|
|
695
|
-
const
|
|
696
|
-
|
|
639
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
640
|
+
const table = wasm.__wbindgen_externrefs;
|
|
641
|
+
const offset = table.grow(4);
|
|
642
|
+
table.set(0, undefined);
|
|
643
|
+
table.set(offset + 0, undefined);
|
|
644
|
+
table.set(offset + 1, null);
|
|
645
|
+
table.set(offset + 2, true);
|
|
646
|
+
table.set(offset + 3, false);
|
|
697
647
|
};
|
|
648
|
+
imports.wbg.memory = memory || new WebAssembly.Memory({initial:18,maximum:16384,shared:true});
|
|
698
649
|
|
|
699
650
|
return imports;
|
|
700
651
|
}
|
|
701
652
|
|
|
702
|
-
function
|
|
703
|
-
imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:18,maximum:16384,shared:true});
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
function __wbg_finalize_init(instance, module) {
|
|
653
|
+
function __wbg_finalize_init(instance, module, thread_stack_size) {
|
|
707
654
|
wasm = instance.exports;
|
|
708
655
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
cachedUint8Memory0 = null;
|
|
656
|
+
cachedDataViewMemory0 = null;
|
|
657
|
+
cachedUint8ArrayMemory0 = null;
|
|
712
658
|
|
|
713
|
-
|
|
659
|
+
if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) { throw 'invalid stack size' }
|
|
660
|
+
wasm.__wbindgen_start(thread_stack_size);
|
|
714
661
|
return wasm;
|
|
715
662
|
}
|
|
716
663
|
|
|
717
|
-
function initSync(module,
|
|
664
|
+
function initSync(module, memory) {
|
|
718
665
|
if (wasm !== undefined) return wasm;
|
|
719
666
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
667
|
+
let thread_stack_size
|
|
668
|
+
if (typeof module !== 'undefined') {
|
|
669
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
670
|
+
({module, memory, thread_stack_size} = module)
|
|
671
|
+
} else {
|
|
672
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
673
|
+
}
|
|
674
|
+
}
|
|
723
675
|
|
|
676
|
+
const imports = __wbg_get_imports(memory);
|
|
724
677
|
if (!(module instanceof WebAssembly.Module)) {
|
|
725
678
|
module = new WebAssembly.Module(module);
|
|
726
679
|
}
|
|
727
|
-
|
|
728
680
|
const instance = new WebAssembly.Instance(module, imports);
|
|
729
|
-
|
|
730
|
-
return __wbg_finalize_init(instance, module);
|
|
681
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
731
682
|
}
|
|
732
683
|
|
|
733
|
-
async function __wbg_init(
|
|
684
|
+
async function __wbg_init(module_or_path, memory) {
|
|
734
685
|
if (wasm !== undefined) return wasm;
|
|
735
686
|
|
|
736
|
-
|
|
737
|
-
|
|
687
|
+
let thread_stack_size
|
|
688
|
+
if (typeof module_or_path !== 'undefined') {
|
|
689
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
690
|
+
({module_or_path, memory, thread_stack_size} = module_or_path)
|
|
691
|
+
} else {
|
|
692
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
693
|
+
}
|
|
738
694
|
}
|
|
739
|
-
const imports = __wbg_get_imports();
|
|
740
695
|
|
|
741
|
-
if (typeof
|
|
742
|
-
|
|
696
|
+
if (typeof module_or_path === 'undefined') {
|
|
697
|
+
module_or_path = new URL('wasm_bhtsne_bg.wasm', import.meta.url);
|
|
743
698
|
}
|
|
699
|
+
const imports = __wbg_get_imports(memory);
|
|
744
700
|
|
|
745
|
-
|
|
701
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
702
|
+
module_or_path = fetch(module_or_path);
|
|
703
|
+
}
|
|
746
704
|
|
|
747
|
-
const { instance, module } = await __wbg_load(await
|
|
705
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
748
706
|
|
|
749
|
-
return __wbg_finalize_init(instance, module);
|
|
707
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
750
708
|
}
|
|
751
709
|
|
|
752
|
-
export { initSync }
|
|
710
|
+
export { initSync };
|
|
753
711
|
export default __wbg_init;
|