dress-graph 0.7.0 → 0.8.0
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/dress.d.ts +10 -10
- package/dress.js +20 -20
- package/package.json +1 -1
- package/dress_wasm.cjs +0 -2
- package/dress_wasm.wasm +0 -0
package/dress.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ export interface DressOptions {
|
|
|
18
18
|
targets: Int32Array | number[];
|
|
19
19
|
/** Optional edge weights (same length as sources) */
|
|
20
20
|
weights?: Float64Array | number[] | null;
|
|
21
|
-
/** Optional
|
|
22
|
-
|
|
21
|
+
/** Optional vertex weights (length numVertices) */
|
|
22
|
+
vertexWeights?: Float64Array | number[] | null;
|
|
23
23
|
/** Graph variant (default: Variant.UNDIRECTED) */
|
|
24
24
|
variant?: number;
|
|
25
25
|
/** Maximum fitting iterations (default: 100) */
|
|
@@ -39,8 +39,8 @@ export interface DressResult {
|
|
|
39
39
|
edgeWeight: Float64Array;
|
|
40
40
|
/** Per-edge dress similarity values */
|
|
41
41
|
edgeDress: Float64Array;
|
|
42
|
-
/** Per-
|
|
43
|
-
|
|
42
|
+
/** Per-vertex aggregated dress similarity */
|
|
43
|
+
vertexDress: Float64Array;
|
|
44
44
|
/** Number of iterations performed */
|
|
45
45
|
iterations: number;
|
|
46
46
|
/** Final maximum per-edge change */
|
|
@@ -61,8 +61,8 @@ export interface DRESSOptions {
|
|
|
61
61
|
targets: Int32Array | number[];
|
|
62
62
|
/** Optional edge weights (same length as sources) */
|
|
63
63
|
weights?: Float64Array | number[] | null;
|
|
64
|
-
/** Optional
|
|
65
|
-
|
|
64
|
+
/** Optional vertex weights (length numVertices) */
|
|
65
|
+
vertexWeights?: Float64Array | number[] | null;
|
|
66
66
|
/** Graph variant (default: Variant.UNDIRECTED) */
|
|
67
67
|
variant?: number;
|
|
68
68
|
/** Pre-compute neighbourhood intercepts (default: false) */
|
|
@@ -90,8 +90,8 @@ export interface DeltaDressOptions {
|
|
|
90
90
|
targets: Int32Array | number[];
|
|
91
91
|
/** Optional edge weights (same length as sources) */
|
|
92
92
|
weights?: Float64Array | number[] | null;
|
|
93
|
-
/** Optional
|
|
94
|
-
|
|
93
|
+
/** Optional vertex weights (length numVertices) */
|
|
94
|
+
vertexWeights?: Float64Array | number[] | null;
|
|
95
95
|
/** Vertices to remove per subset (default: 0 = original graph) */
|
|
96
96
|
k?: number;
|
|
97
97
|
/** Graph variant (default: Variant.UNDIRECTED) */
|
|
@@ -141,8 +141,8 @@ export interface NablaDressOptions {
|
|
|
141
141
|
targets: Int32Array | number[];
|
|
142
142
|
/** Optional edge weights (same length as sources) */
|
|
143
143
|
weights?: Float64Array | number[] | null;
|
|
144
|
-
/** Optional
|
|
145
|
-
|
|
144
|
+
/** Optional vertex weights (length numVertices) */
|
|
145
|
+
vertexWeights?: Float64Array | number[] | null;
|
|
146
146
|
/** Vertices to remove per tuple (default: 0 = original graph) */
|
|
147
147
|
k?: number;
|
|
148
148
|
/** Graph variant (default: Variant.UNDIRECTED) */
|
package/dress.js
CHANGED
|
@@ -75,7 +75,7 @@ export const Variant = Object.freeze({
|
|
|
75
75
|
* @property {Int32Array} targets - Edge target vertices
|
|
76
76
|
* @property {Float64Array} edgeWeight - Per-edge variant weights
|
|
77
77
|
* @property {Float64Array} edgeDress - Per-edge dress similarity
|
|
78
|
-
* @property {Float64Array}
|
|
78
|
+
* @property {Float64Array} vertexDress - Per-vertex aggregated similarity
|
|
79
79
|
* @property {number} iterations - Iterations performed
|
|
80
80
|
* @property {number} delta - Final max per-edge change
|
|
81
81
|
*/
|
|
@@ -128,15 +128,15 @@ export async function fit(opts) {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
//
|
|
131
|
+
// vertex weights (nullable)
|
|
132
132
|
let nwPtr = 0; // NULL
|
|
133
|
-
if (opts.
|
|
134
|
-
if (opts.
|
|
135
|
-
throw new Error(`
|
|
133
|
+
if (opts.vertexWeights) {
|
|
134
|
+
if (opts.vertexWeights.length !== N) {
|
|
135
|
+
throw new Error(`vertexWeights (${opts.vertexWeights.length}) must equal vertex count (${N})`);
|
|
136
136
|
}
|
|
137
137
|
nwPtr = M._malloc(N * 8);
|
|
138
138
|
const heapF64 = M.HEAPF64;
|
|
139
|
-
const nw = opts.
|
|
139
|
+
const nw = opts.vertexWeights;
|
|
140
140
|
for (let i = 0; i < N; i++) {
|
|
141
141
|
heapF64[(nwPtr >> 3) + i] = nw[i];
|
|
142
142
|
}
|
|
@@ -173,16 +173,16 @@ export async function fit(opts) {
|
|
|
173
173
|
// offset 40: *edge_weight (ptr32)
|
|
174
174
|
// offset 44: *edge_dress (ptr32)
|
|
175
175
|
// offset 48: *edge_dress_next (ptr32)
|
|
176
|
-
// offset 52: *
|
|
176
|
+
// offset 52: *vertex_dress (ptr32)
|
|
177
177
|
// offset 56: *NW (ptr32)
|
|
178
178
|
const ewPtr = M.getValue(g + 40, 'i32'); // edge_weight pointer
|
|
179
179
|
const edPtr = M.getValue(g + 44, 'i32'); // edge_dress pointer
|
|
180
|
-
const ndPtr = M.getValue(g + 52, 'i32'); //
|
|
180
|
+
const ndPtr = M.getValue(g + 52, 'i32'); // vertex_dress pointer
|
|
181
181
|
|
|
182
182
|
// Copy results into JS-owned typed arrays
|
|
183
183
|
const edgeWeight = new Float64Array(E);
|
|
184
184
|
const edgeDress = new Float64Array(E);
|
|
185
|
-
const
|
|
185
|
+
const vertexDress = new Float64Array(N);
|
|
186
186
|
|
|
187
187
|
const heapF64 = M.HEAPF64;
|
|
188
188
|
for (let i = 0; i < E; i++) {
|
|
@@ -190,7 +190,7 @@ export async function fit(opts) {
|
|
|
190
190
|
edgeDress[i] = heapF64[(edPtr >> 3) + i];
|
|
191
191
|
}
|
|
192
192
|
for (let i = 0; i < N; i++) {
|
|
193
|
-
|
|
193
|
+
vertexDress[i] = heapF64[(ndPtr >> 3) + i];
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
// Copy sources/targets before free
|
|
@@ -211,7 +211,7 @@ export async function fit(opts) {
|
|
|
211
211
|
targets: targetsOut,
|
|
212
212
|
edgeWeight: edgeWeight,
|
|
213
213
|
edgeDress: edgeDress,
|
|
214
|
-
|
|
214
|
+
vertexDress: vertexDress,
|
|
215
215
|
iterations: iterations,
|
|
216
216
|
delta: delta,
|
|
217
217
|
};
|
|
@@ -286,10 +286,10 @@ export class DRESS {
|
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
let nwPtr = 0;
|
|
289
|
-
if (opts.
|
|
289
|
+
if (opts.vertexWeights && opts.vertexWeights.length === N) {
|
|
290
290
|
nwPtr = M._malloc(N * 8);
|
|
291
291
|
for (let i = 0; i < N; i++) {
|
|
292
|
-
M.HEAPF64[(nwPtr >> 3) + i] = opts.
|
|
292
|
+
M.HEAPF64[(nwPtr >> 3) + i] = opts.vertexWeights[i];
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
|
|
@@ -346,14 +346,14 @@ export class DRESS {
|
|
|
346
346
|
|
|
347
347
|
const edgeWeight = new Float64Array(E);
|
|
348
348
|
const edgeDress = new Float64Array(E);
|
|
349
|
-
const
|
|
349
|
+
const vertexDress = new Float64Array(N);
|
|
350
350
|
|
|
351
351
|
for (let i = 0; i < E; i++) {
|
|
352
352
|
edgeWeight[i] = M.HEAPF64[(ewPtr >> 3) + i];
|
|
353
353
|
edgeDress[i] = M.HEAPF64[(edPtr >> 3) + i];
|
|
354
354
|
}
|
|
355
355
|
for (let i = 0; i < N; i++) {
|
|
356
|
-
|
|
356
|
+
vertexDress[i] = M.HEAPF64[(ndPtr >> 3) + i];
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
return {
|
|
@@ -361,7 +361,7 @@ export class DRESS {
|
|
|
361
361
|
targets: new Int32Array(this._targets),
|
|
362
362
|
edgeWeight,
|
|
363
363
|
edgeDress,
|
|
364
|
-
|
|
364
|
+
vertexDress,
|
|
365
365
|
iterations: 0,
|
|
366
366
|
delta: 0,
|
|
367
367
|
};
|
|
@@ -606,11 +606,11 @@ export async function deltaFit(opts) {
|
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
let nwPtr = 0;
|
|
609
|
-
if (opts.
|
|
609
|
+
if (opts.vertexWeights && opts.vertexWeights.length === N) {
|
|
610
610
|
nwPtr = M._malloc(N * 8);
|
|
611
611
|
const heapF64 = M.HEAPF64;
|
|
612
612
|
for (let i = 0; i < N; i++) {
|
|
613
|
-
heapF64[(nwPtr >> 3) + i] = opts.
|
|
613
|
+
heapF64[(nwPtr >> 3) + i] = opts.vertexWeights[i];
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
|
|
@@ -739,11 +739,11 @@ export async function nablaFit(opts) {
|
|
|
739
739
|
}
|
|
740
740
|
|
|
741
741
|
let nwPtr = 0;
|
|
742
|
-
if (opts.
|
|
742
|
+
if (opts.vertexWeights && opts.vertexWeights.length === N) {
|
|
743
743
|
nwPtr = M._malloc(N * 8);
|
|
744
744
|
const heapF64 = M.HEAPF64;
|
|
745
745
|
for (let i = 0; i < N; i++) {
|
|
746
|
-
heapF64[(nwPtr >> 3) + i] = opts.
|
|
746
|
+
heapF64[(nwPtr >> 3) + i] = opts.vertexWeights[i];
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dress-graph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "DRESS is a deterministic, parameter-free framework that iteratively refines the structural similarity of edges in a graph to produce a canonical fingerprint: a real-valued edge vector, obtained by converging a non-linear dynamical system to its unique fixed point. The fingerprint is self-contained, isomorphism-invariant by construction, numerically stable (no overflow, no error amplification, no undefined behavior), fast and embarrassingly parallel to compute: DRESS total runtime is O(I * m * d_max) for I iterations to convergence, and convergence is guaranteed by Birkhoff contraction.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dress.js",
|
package/dress_wasm.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var createDressModule=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};if(typeof __filename!="undefined"){_scriptName=__filename}else{}var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");scriptDirectory=__dirname+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var isFileURI=filename=>filename.startsWith("file://");var readyPromiseResolve,readyPromiseReject;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var HEAP64,HEAPU64;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;wasmExports["c"]()}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){return locateFile("dress_wasm.wasm")}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){return new Promise((resolve,reject)=>{Module["instantiateWasm"](info,(inst,mod)=>{resolve(receiveInstance(inst,mod))})})}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr];case"i8":return HEAP8[ptr];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP64[ptr>>3];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort(`invalid type for getValue: ${type}`)}}var noExitRuntime=true;function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr]=value;break;case"i8":HEAP8[ptr]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":HEAP64[ptr>>3]=BigInt(value);break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort(`invalid type for setValue: ${type}`)}}var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var UTF8Decoder=globalThis.TextDecoder&&new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead,ignoreNul)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead,ignoreNul):"";var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func(...cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret};var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};{if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].shift()()}}}Module["ccall"]=ccall;Module["cwrap"]=cwrap;Module["setValue"]=setValue;Module["getValue"]=getValue;var _dress_init_graph,_malloc,_free,_dress_fit,_dress_free_graph,_dress_get,_dress_delta_fit,_dress_delta_fit_strided,_dress_nabla_fit,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,memory,__indirect_function_table,wasmMemory;function assignWasmExports(wasmExports){_dress_init_graph=Module["_dress_init_graph"]=wasmExports["d"];_malloc=Module["_malloc"]=wasmExports["e"];_free=Module["_free"]=wasmExports["f"];_dress_fit=Module["_dress_fit"]=wasmExports["g"];_dress_free_graph=Module["_dress_free_graph"]=wasmExports["h"];_dress_get=Module["_dress_get"]=wasmExports["i"];_dress_delta_fit=Module["_dress_delta_fit"]=wasmExports["j"];_dress_delta_fit_strided=Module["_dress_delta_fit_strided"]=wasmExports["k"];_dress_nabla_fit=Module["_dress_nabla_fit"]=wasmExports["l"];__emscripten_stack_restore=wasmExports["m"];__emscripten_stack_alloc=wasmExports["n"];_emscripten_stack_get_current=wasmExports["o"];memory=wasmMemory=wasmExports["b"];__indirect_function_table=wasmExports["__indirect_function_table"]}var wasmImports={a:_emscripten_resize_heap};function run(){preRun();function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}var wasmExports;wasmExports=await (createWasm());run();if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}
|
|
2
|
-
;return moduleRtn}})();if(typeof exports==="object"&&typeof module==="object"){module.exports=createDressModule;module.exports.default=createDressModule}else if(typeof define==="function"&&define["amd"])define([],()=>createDressModule);
|
package/dress_wasm.wasm
DELETED
|
Binary file
|