@topolab/tda 0.3.0 → 0.4.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/CHANGELOG.md +45 -21
- package/CITATION.cff +1 -1
- package/README.md +1 -1
- package/THIRD_PARTY_LICENSES.md +5 -4
- package/dist/arrangement.d.ts +50 -0
- package/dist/arrangement.d.ts.map +1 -0
- package/dist/arrangement.js +63 -0
- package/dist/arrangement.js.map +1 -0
- package/dist/build_info.json +5 -5
- package/dist/experimental.d.ts +7 -3
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +6 -3
- package/dist/experimental.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/ladder/tda_ladder_bg.wasm +0 -0
- package/dist/pkg/tda_wasm.js +629 -1
- package/dist/rivet_input.d.ts +93 -0
- package/dist/rivet_input.d.ts.map +1 -0
- package/dist/rivet_input.js +132 -0
- package/dist/rivet_input.js.map +1 -0
- package/dist/tda.wasm +0 -0
- package/dist/two_parameter.d.ts +243 -0
- package/dist/two_parameter.d.ts.map +1 -0
- package/dist/two_parameter.js +275 -0
- package/dist/two_parameter.js.map +1 -0
- package/package.json +1 -1
- package/src/arrangement.ts +96 -0
- package/src/experimental.ts +7 -3
- package/src/index.ts +26 -0
- package/src/rivet_input.ts +195 -0
- package/src/two_parameter.ts +480 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,29 +4,46 @@ Every user-visible change to `@topolab/tda` is listed here. The format
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions
|
|
5
5
|
follow [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [0.4.0]
|
|
8
8
|
|
|
9
9
|
### Added
|
|
10
10
|
|
|
11
|
-
- **
|
|
12
|
-
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
- **Two-parameter persistence** (experimental, over Z/2).
|
|
12
|
+
`functionRipsPresentation`, `degreeRipsPresentation` and
|
|
13
|
+
`bifiltrationPresentation` compute a minimal presentation of the homology
|
|
14
|
+
of a function-Rips or degree-Rips bifiltration or of any bifiltered
|
|
15
|
+
complex, one grade a cell or several; `bigradedBetti` gives the bigraded Betti numbers and
|
|
16
|
+
the Hilbert function, and `fiberedBarcode` the barcode along one or
|
|
17
|
+
several lines. The live example of the Two-parameter persistence guide
|
|
18
|
+
shows them.
|
|
19
|
+
`coarsenPresentation` coarsens a presentation onto RIVET's grid of bins,
|
|
20
|
+
and `augmentedArrangement` (`@topolab/tda/experimental`, a handle that owns
|
|
21
|
+
native memory) builds RIVET's augmented arrangement, whose
|
|
22
|
+
`fiberedBarcode` answers from a stored barcode template per cell; its
|
|
23
|
+
barcodes agree with RIVET's in `benchmarks/two_parameter/rivet_fibered.py`.
|
|
24
|
+
`parseRivetInput` reads RIVET's input data files, `rivetPresentation`
|
|
25
|
+
computes the module such a file describes, and `firepPresentation` the
|
|
26
|
+
module of a chain complex of free bigraded modules (RIVET's FIRep).
|
|
27
|
+
`rivetPresentation` computes RIVET's built-in functions
|
|
28
|
+
(`--function balldensity[r]`, `gaussian[σ]`, `eccentricity[p]`, with
|
|
29
|
+
RIVET's defaults for empty brackets) from the points or the metric space.
|
|
30
|
+
`rivetPresentation(text, { degree })` takes the text of a file, not
|
|
31
|
+
`parseRivetInput`'s result, and its degree defaults to 0, as RIVET's
|
|
32
|
+
`--homology`; both functions call the Rust crate's reader and need the
|
|
33
|
+
module. The Rust crate `topolab-tda` offers the same module
|
|
34
|
+
(`two_parameter`), RIVET files included (`parse_rivet_input`,
|
|
35
|
+
`rivet_presentation`); a line given to `fiberedBarcode` by its angle or
|
|
36
|
+
its direction is built by the crate's `Line::from_angle` or `Line::new`,
|
|
37
|
+
so the npm package, the Python package and the crate return the same
|
|
38
|
+
bits.
|
|
22
39
|
|
|
23
|
-
|
|
40
|
+
## [0.3.1]
|
|
24
41
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`
|
|
29
|
-
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- The changelog. 0.3.0 shipped the vineyard additions (any prime field, representative
|
|
45
|
+
cycles at chosen times) under an `[Unreleased]` heading; they are listed under 0.3.0 below. The
|
|
46
|
+
code is the same as in 0.3.0.
|
|
30
47
|
|
|
31
48
|
## [0.3.0] — first public release
|
|
32
49
|
|
|
@@ -51,13 +68,20 @@ follow [Semantic Versioning](https://semver.org/).
|
|
|
51
68
|
`volumeOptimalCycles`. The `coeff` option takes any prime `p` up to
|
|
52
69
|
2^31 − 1 (`Z/p`); zigzag persistence is over Z/2.
|
|
53
70
|
- **Vineyards.** `vineyard(complex, frames)` follows persistence classes
|
|
54
|
-
through a straight-line homotopy of values on a single complex
|
|
55
|
-
|
|
71
|
+
through a straight-line homotopy of values on a single complex, using the
|
|
72
|
+
transposition update of Cohen-Steiner, Edelsbrunner, and Morozov
|
|
56
73
|
(SoCG 2006), and returns vines as typed arrays of knots. `cubicalVineyard`
|
|
57
74
|
follows the cubical diagrams of a sequence of images or volumes of the
|
|
58
75
|
same shape, and `ripsVineyard` follows the Rips diagrams of a moving point
|
|
59
76
|
cloud, each building one shared complex and assigning its values at every
|
|
60
|
-
frame.
|
|
77
|
+
frame. All three take `coeff` (any prime `p` from 2 to 2^31 − 1, default
|
|
78
|
+
2, reported in the result's `coeff`) and `representatives: { times, dims? }`,
|
|
79
|
+
which returns one representative cycle over `Z/coeff` per persisting vine
|
|
80
|
+
at each requested time in `[0, frames − 1]` (`VineyardRepresentatives`,
|
|
81
|
+
`VineyardRepresentativesOptions`). Stable: checked against GUDHI 3.12
|
|
82
|
+
(`SimplexTree`, `CubicalComplex` and `RipsComplex`) on 30 seeded inputs
|
|
83
|
+
over `Z/2` and `Z/3` at every frame and at interpolated times between
|
|
84
|
+
frames.
|
|
61
85
|
- **Diagrams.** `bettiNumbers`, `bettiCurve`, `persistenceLandscape`,
|
|
62
86
|
`persistenceImage`, and the exact `diagramBottleneck` and
|
|
63
87
|
`diagramWasserstein`.
|
package/CITATION.cff
CHANGED
|
@@ -3,7 +3,7 @@ message: "If you use this software, please cite it as below. For the algorithms
|
|
|
3
3
|
type: software
|
|
4
4
|
title: "topolab TDA"
|
|
5
5
|
abstract: "Topological data analysis for the browser and Node.js, in Rust compiled to WebAssembly, as the package @topolab/tda."
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.4.0"
|
|
7
7
|
license: MIT
|
|
8
8
|
url: "https://topolab.ai/tda/docs/"
|
|
9
9
|
authors:
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ topolab TDA is topological data analysis for the browser and Node.js, in Rust co
|
|
|
8
8
|
npm install @topolab/tda
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The package is ES-module only and has no runtime dependencies. It needs Node.js 22 or later, or a browser with WebAssembly SIMD, bulk memory and reference types. The WebAssembly module, `tda.wasm`, about
|
|
11
|
+
The package is ES-module only and has no runtime dependencies. It needs Node.js 22 or later, or a browser with WebAssembly SIMD, bulk memory and reference types. The WebAssembly module, `tda.wasm`, about 2.2 MB (about 0.8 MB gzipped), is part of the package.
|
|
12
12
|
|
|
13
13
|
| | Needs | Tested |
|
|
14
14
|
|---|---|---|
|
package/THIRD_PARTY_LICENSES.md
CHANGED
|
@@ -221,10 +221,10 @@ branch. The licence texts are in "Notice texts" at the end of this file.
|
|
|
221
221
|
| cfg-if | 1.0.5 | MIT OR Apache-2.0 | Copyright (c) 2014 Alex Crichton | yes | yes |
|
|
222
222
|
| unicode-ident | 1.0.26 | (MIT OR Apache-2.0) AND Unicode-3.0 | none in its LICENSE-MIT (author: David Tolnay); Unicode-3.0 part: Copyright (c) 1991-2023 Unicode, Inc. | yes | yes |
|
|
223
223
|
| libm | 0.2.16 | **MIT** | Copyright (c) 2018 Jorge Aparicio; portions of musl libc (Copyright (c) 2005-2020 Rich Felker, et al.), the CORE-MATH project, and the Sun, FreeBSD and Arm notices listed in its file | yes | no |
|
|
224
|
-
| `memory-phase` (this package, `rust/memory-phase`) | 0.1.0 | MIT | topolab | yes | yes |
|
|
225
|
-
| `musl-math` (this package, `rust/musl-math`; derived from musl, see "Ported code" below) | 0.1.0 | MIT; MIT-licensed musl and Arm optimized-routines parts | see "Ported code" | yes | no |
|
|
224
|
+
| `topolab-memory-phase` (this package, `rust/memory-phase`) | 0.1.0 | MIT | topolab | yes | yes |
|
|
225
|
+
| `topolab-musl-math` (this package, `rust/musl-math`; derived from musl, see "Ported code" below) | 0.1.0 | MIT; MIT-licensed musl and Arm optimized-routines parts | see "Ported code" | yes | no |
|
|
226
226
|
| `ot-diagram` (this package; derived from LEMON, see "LEMON") | 0.1.0 | MIT; BSL-1.0 part | see "LEMON" | yes | no |
|
|
227
|
-
| `tda-core
|
|
227
|
+
| `topolab-tda` (`rust/tda-core`), `tda-wasm` / `tda-ladder`, `tda-ladder-wasm` (this package) | | MIT | topolab | yes | yes (ladder crates) |
|
|
228
228
|
|
|
229
229
|
**The Rust standard library** (`core`, `alloc`, `std`; toolchain 1.98.1,
|
|
230
230
|
target `wasm32-unknown-unknown`) is MIT OR Apache-2.0, "Copyright The Rust
|
|
@@ -321,7 +321,8 @@ The generated JavaScript glue (`dist/pkg/tda_wasm.js`,
|
|
|
321
321
|
```
|
|
322
322
|
|
|
323
323
|
- **`libm` 0.2.16** (crates.io; licence **MIT**): `hypot`, `sin` and `cos`
|
|
324
|
-
of the ellipsoid and wing builders
|
|
324
|
+
of the ellipsoid and wing builders, and `sin` and `cos` of a two-parameter
|
|
325
|
+
line given by its angle. Its `LICENSE.txt`, with the component
|
|
325
326
|
notices it carries (musl, CORE-MATH, Sun Microsystems, FreeBSD, Arm), is in
|
|
326
327
|
"Notice texts" below.
|
|
327
328
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { FiberedBarcode, Presentation, SliceLine } from './two_parameter.js';
|
|
2
|
+
/**
|
|
3
|
+
* The augmented arrangement of a presented module, built once by
|
|
4
|
+
* {@link augmentedArrangement} and held in the module's memory. The object
|
|
5
|
+
* is frozen.
|
|
6
|
+
*/
|
|
7
|
+
export interface AugmentedArrangement {
|
|
8
|
+
/**
|
|
9
|
+
* The anchors kept, as grades `[x, y, …]`: the least upper bounds of two
|
|
10
|
+
* incomparable grades whose order along a line decides the barcode. Each
|
|
11
|
+
* is a segment of the arrangement in the space of lines.
|
|
12
|
+
*/
|
|
13
|
+
readonly anchors: Float64Array;
|
|
14
|
+
/** The number of cells (faces of the arrangement). */
|
|
15
|
+
readonly cells: number;
|
|
16
|
+
/** The number of distinct barcode templates among the cells. */
|
|
17
|
+
readonly templates: number;
|
|
18
|
+
/** `true` once {@link AugmentedArrangement.dispose} or `unload()` has released it. */
|
|
19
|
+
readonly disposed: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The barcode along a line, or along each line of an array: the same
|
|
22
|
+
* arrays as `fiberedBarcode(presentation, lines)`, read off the template
|
|
23
|
+
* of the line's cell. The results are plain copies that own no wasm
|
|
24
|
+
* memory. Throws an `Error` once the arrangement is disposed.
|
|
25
|
+
*/
|
|
26
|
+
fiberedBarcode(line: SliceLine): FiberedBarcode;
|
|
27
|
+
fiberedBarcode(lines: readonly SliceLine[]): FiberedBarcode[];
|
|
28
|
+
/**
|
|
29
|
+
* Releases the native arrangement. Idempotent. Until then it is held by
|
|
30
|
+
* the module's cleanup list, so dropping the last reference does not free
|
|
31
|
+
* it before `unload()`.
|
|
32
|
+
*/
|
|
33
|
+
dispose(): void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* **Experimental.** The augmented arrangement of a presented module
|
|
37
|
+
* (Lesnick and Wright, [reference](https://topolab.ai/tda/docs/references/#lesnick-and-wright-2015)):
|
|
38
|
+
* the lines of non-negative slope cut into cells, each with a barcode
|
|
39
|
+
* template, so that the barcode along any line costs locating its cell
|
|
40
|
+
* and one push per grade. Building it costs about one vineyard update per
|
|
41
|
+
* pair of cells and grades exchanged; the number of cells grows with the
|
|
42
|
+
* square of the number of anchors, so a large module is first coarsened
|
|
43
|
+
* (`coarsenPresentation`).
|
|
44
|
+
*
|
|
45
|
+
* Ownership is that of `prepareComplex`: the arrangement is a copy, held
|
|
46
|
+
* until `dispose()` or `unload()`, tied to the module instance (one per
|
|
47
|
+
* thread) that built it; every barcode is an independent copy.
|
|
48
|
+
*/
|
|
49
|
+
export declare function augmentedArrangement(presentation: Presentation): AugmentedArrangement;
|
|
50
|
+
//# sourceMappingURL=arrangement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrangement.d.ts","sourceRoot":"","sources":["../src/arrangement.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAElF;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sFAAsF;IACtF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc,CAAC;IAChD,cAAc,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IAC9D;;;;OAIG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,YAAY,GAAG,oBAAoB,CAsCrF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The augmented arrangement of a two-parameter persistence module: a native
|
|
3
|
+
* structure that answers barcodes along lines without a reduction per line.
|
|
4
|
+
* Exported only from `@topolab/tda/experimental` (src/experimental.ts).
|
|
5
|
+
*/
|
|
6
|
+
import { call, module, onUnload } from './load.js';
|
|
7
|
+
import { barcodesOf, checked, linesOf } from './two_parameter.js';
|
|
8
|
+
/**
|
|
9
|
+
* **Experimental.** The augmented arrangement of a presented module
|
|
10
|
+
* (Lesnick and Wright, [reference](https://topolab.ai/tda/docs/references/#lesnick-and-wright-2015)):
|
|
11
|
+
* the lines of non-negative slope cut into cells, each with a barcode
|
|
12
|
+
* template, so that the barcode along any line costs locating its cell
|
|
13
|
+
* and one push per grade. Building it costs about one vineyard update per
|
|
14
|
+
* pair of cells and grades exchanged; the number of cells grows with the
|
|
15
|
+
* square of the number of anchors, so a large module is first coarsened
|
|
16
|
+
* (`coarsenPresentation`).
|
|
17
|
+
*
|
|
18
|
+
* Ownership is that of `prepareComplex`: the arrangement is a copy, held
|
|
19
|
+
* until `dispose()` or `unload()`, tied to the module instance (one per
|
|
20
|
+
* thread) that built it; every barcode is an independent copy.
|
|
21
|
+
*/
|
|
22
|
+
export function augmentedArrangement(presentation) {
|
|
23
|
+
module();
|
|
24
|
+
const p = checked(presentation, 'presentation');
|
|
25
|
+
// The native object stays in this closure: no pointer is exposed that could
|
|
26
|
+
// be forged or used after its module is unloaded.
|
|
27
|
+
let raw = call((m) => new m.TwoParameterArrangement(p.xs, p.ys, p.generators, p.relations, p.offsets, p.rows));
|
|
28
|
+
const stats = call(() => raw.stats());
|
|
29
|
+
const anchors = call(() => raw.anchors());
|
|
30
|
+
let unregister;
|
|
31
|
+
// After a trap the handle is abandoned with its instance, never freed in
|
|
32
|
+
// it (see src/prepared.ts).
|
|
33
|
+
const release = (trapped) => {
|
|
34
|
+
if (raw === null)
|
|
35
|
+
return;
|
|
36
|
+
const owned = raw;
|
|
37
|
+
raw = null;
|
|
38
|
+
unregister?.();
|
|
39
|
+
unregister = undefined;
|
|
40
|
+
if (trapped)
|
|
41
|
+
owned.__destroy_into_raw();
|
|
42
|
+
else
|
|
43
|
+
owned.delete();
|
|
44
|
+
};
|
|
45
|
+
unregister = onUnload(release);
|
|
46
|
+
function fiberedBarcode(lines) {
|
|
47
|
+
if (raw === null)
|
|
48
|
+
throw new Error('augmented arrangement has been disposed');
|
|
49
|
+
const { many, flat, angles } = linesOf(lines);
|
|
50
|
+
return call(() => barcodesOf(raw.barcodes(flat, angles), many));
|
|
51
|
+
}
|
|
52
|
+
return Object.freeze({
|
|
53
|
+
anchors,
|
|
54
|
+
cells: stats[2],
|
|
55
|
+
templates: stats[3],
|
|
56
|
+
get disposed() {
|
|
57
|
+
return raw === null;
|
|
58
|
+
},
|
|
59
|
+
fiberedBarcode,
|
|
60
|
+
dispose: () => release(false)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=arrangement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrangement.js","sourceRoot":"","sources":["../src/arrangement.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqClE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA0B;IAC7D,MAAM,EAAE,CAAC;IACT,MAAM,CAAC,GAAG,OAAO,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAChD,4EAA4E;IAC5E,kDAAkD;IAClD,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,O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AAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;KAC9B,CAAC,CAAC;AACL,CAAC"}
|
package/dist/build_info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"date": "2026-
|
|
2
|
+
"date": "2026-12-01T06:52:37Z",
|
|
3
3
|
"engine": "wasm-bindgen",
|
|
4
4
|
"rust": "rustc 1.98.1 (48a229cea 2026-09-01)",
|
|
5
5
|
"wasm_bindgen": "0.2.129",
|
|
6
6
|
"wasm_opt": "wasm-opt version 132",
|
|
7
|
-
"raw_bytes":
|
|
8
|
-
"f64x2_lane_reads_rewritten":
|
|
9
|
-
"bytes":
|
|
10
|
-
"glue_bytes":
|
|
7
|
+
"raw_bytes": 2509495,
|
|
8
|
+
"f64x2_lane_reads_rewritten": 577,
|
|
9
|
+
"bytes": 2156444,
|
|
10
|
+
"glue_bytes": 117161,
|
|
11
11
|
"sources": "the Rust crates tda-core, ot-diagram and musl-math, through tda-wasm"
|
|
12
12
|
}
|
package/dist/experimental.d.ts
CHANGED
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
* release, outside the plain-data contract of the root entry point.
|
|
4
4
|
*
|
|
5
5
|
* `prepareComplex` keeps a validated complex in the module's memory for
|
|
6
|
-
* repeated persistence queries
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* repeated persistence queries, and `augmentedArrangement` the augmented
|
|
7
|
+
* arrangement of a two-parameter module for repeated barcodes along lines.
|
|
8
|
+
* Unlike every root function, they return handles that own native memory:
|
|
9
|
+
* dispose them (or `unload()`). They use the module the root's `load()`
|
|
10
|
+
* loaded.
|
|
9
11
|
*
|
|
10
12
|
* @packageDocumentation
|
|
11
13
|
*/
|
|
12
14
|
export { prepareComplex } from './prepared.js';
|
|
13
15
|
export type { PreparedComplex } from './prepared.js';
|
|
16
|
+
export { augmentedArrangement } from './arrangement.js';
|
|
17
|
+
export type { AugmentedArrangement } from './arrangement.js';
|
|
14
18
|
//# sourceMappingURL=experimental.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/experimental.js
CHANGED
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
* release, outside the plain-data contract of the root entry point.
|
|
4
4
|
*
|
|
5
5
|
* `prepareComplex` keeps a validated complex in the module's memory for
|
|
6
|
-
* repeated persistence queries
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* repeated persistence queries, and `augmentedArrangement` the augmented
|
|
7
|
+
* arrangement of a two-parameter module for repeated barcodes along lines.
|
|
8
|
+
* Unlike every root function, they return handles that own native memory:
|
|
9
|
+
* dispose them (or `unload()`). They use the module the root's `load()`
|
|
10
|
+
* loaded.
|
|
9
11
|
*
|
|
10
12
|
* @packageDocumentation
|
|
11
13
|
*/
|
|
12
14
|
export { prepareComplex } from './prepared.js';
|
|
15
|
+
export { augmentedArrangement } from './arrangement.js';
|
|
13
16
|
//# sourceMappingURL=experimental.js.map
|
package/dist/experimental.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.js","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"experimental.js","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export type { PointCloud, Vec } from './check.js';
|
|
|
26
26
|
export type { Complex, ComplexLike, CubicalComplex, Diagram, DistanceMatrix, Grid, BuilderPersistence, BuilderPersistenceOptions, Scale, Simplex } from './types.js';
|
|
27
27
|
export { ripsComplex, cechComplex, cechPersistence, delaunayCechComplex, alphaComplex, alphaPersistence, coupledAlphaComplex, witnessComplex, kFoldCoverComplex, kFoldCoverPersistence, ellipsoids, ellipsoidRipsComplex, ellipsoidRipsPersistence, ellipsoidCechComplex, ellipsoidCechPersistence, wings, wingComplex, wingPersistence, boxFiltration, boxFiltrationPersistence, cubicalComplex } from './complex.js';
|
|
28
28
|
export type { RipsComplexOptions, CechComplexOptions, CechPersistenceOptions, DelaunayCechComplexOptions, AlphaComplexOptions, AlphaPersistenceOptions, AlphaPersistence, Flattened, FlattenableComplex, CoupledAlphaComplexOptions, WitnessComplexOptions, KFoldCoverComplex, KFoldCoverComplexOptions, KFoldCoverDiagnostics, KFoldCoverPersistenceOptions, EllipsoidAxes, EllipsoidGeometry, EllipsoidOptions, EllipsoidRipsComplexOptions, EllipsoidRipsPersistenceOptions, EllipsoidCechComplexOptions, EllipsoidCechPersistenceOptions, WingGeometry, WingNormalSource, WingOptions, WingComplexOptions, WingPersistenceOptions, BoxExtent, BoxFiltration, BoxFiltrationDiagnostics, BoxFiltrationOptions, BoxFiltrationPersistenceOptions } from './complex.js';
|
|
29
|
+
export { functionRipsPresentation, degreeRipsPresentation, bifiltrationPresentation, bigradedBetti, fiberedBarcode, coarsenPresentation, firepPresentation } from './two_parameter.js';
|
|
30
|
+
export { parseRivetInput, rivetPresentation } from './rivet_input.js';
|
|
31
|
+
export type { RivetInput, RivetPresentationOptions } from './rivet_input.js';
|
|
32
|
+
export type { Presentation, FunctionRipsPresentationOptions, DegreeRipsPresentationOptions, Bifiltration, BifiltrationPresentationOptions, BigradedBetti, SliceLine, FiberedBarcode, CoarsenPresentationOptions, Firep, FirepMatrix, FirepPresentationOptions } from './two_parameter.js';
|
|
29
33
|
export { persistence, ripsPersistence, cubicalPersistence, zigzagPersistence, insertOp, removeOp, volumeOptimalCycles } from './persistence.js';
|
|
30
34
|
export type { PersistenceOptions, RipsPersistence, RipsPersistenceOptions, RipsRepresentatives, RepresentativesOptions, CubicalPersistenceOptions, InsertOp, RemoveOp, ZigzagOp, PackedZigzag, ZigzagPersistence, ZigzagPersistenceOptions, VolumeOptimalCycles, VolumeOptimalCyclesOptions } from './persistence.js';
|
|
31
35
|
export { cubicalVineyard, ripsVineyard, vineyard } from './vineyard.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC5D,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAClD,YAAY,EACV,OAAO,EACP,WAAW,EACX,cAAc,EACd,OAAO,EACP,cAAc,EACd,IAAI,EACJ,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,EACL,OAAO,EACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,wBAAwB,EACxB,cAAc,EACf,MAAM,c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BAAuB,EACvB,8BAA8B,EAC/B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,2BAA2B,EAC3B,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EACzB,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAExE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export { load, unload, isLoaded, version } from './load.js';
|
|
24
24
|
export { ripsComplex, cechComplex, cechPersistence, delaunayCechComplex, alphaComplex, alphaPersistence, coupledAlphaComplex, witnessComplex, kFoldCoverComplex, kFoldCoverPersistence, ellipsoids, ellipsoidRipsComplex, ellipsoidRipsPersistence, ellipsoidCechComplex, ellipsoidCechPersistence, wings, wingComplex, wingPersistence, boxFiltration, boxFiltrationPersistence, cubicalComplex } from './complex.js';
|
|
25
|
+
export { functionRipsPresentation, degreeRipsPresentation, bifiltrationPresentation, bigradedBetti, fiberedBarcode, coarsenPresentation, firepPresentation } from './two_parameter.js';
|
|
26
|
+
export { parseRivetInput, rivetPresentation } from './rivet_input.js';
|
|
25
27
|
export { persistence, ripsPersistence, cubicalPersistence, zigzagPersistence, insertOp, removeOp, volumeOptimalCycles } from './persistence.js';
|
|
26
28
|
export { cubicalVineyard, ripsVineyard, vineyard } from './vineyard.js';
|
|
27
29
|
export { bettiNumbers, bettiCurve, persistenceLandscape, persistenceImage, diagramWasserstein, diagramBottleneck } from './diagram.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgB5D,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,wBAAwB,EACxB,cAAc,EACf,MAAM,cAAc,CAAC;AAoCtB,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAkB1B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAWxE,OAAO,EACL,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgB5D,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,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