diff --git a/AGENTS.md b/AGENTS.md index 5655079..1fbd825 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# DiffusionGeometryJ +# DiffusionGeometryJL Julia port of the Python `DiffusionGeometry` package — data-driven calculus, geometry, and topology on point clouds via heat diffusion and the carré du champ diff --git a/Project.toml b/Project.toml index 8a53c3a..eefdae2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "DiffusionGeometryJ" +name = "DiffusionGeometryJL" uuid = "f8140dce-05b1-4e22-80fe-cf341a3061cb" version = "0.1.0" authors = ["Iolo Jones", "David Lanners"] @@ -19,7 +19,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" [extensions] -DiffusionGeometryJMakieExt = "Makie" +DiffusionGeometryJLMakieExt = "Makie" [compat] Convex = "0.16.6" diff --git a/README.md b/README.md index 3e78193..9d5f93a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# DiffusionGeometryJ +# DiffusionGeometryJL Data-driven calculus, geometry, and topology on point clouds — via heat diffusion and the carré du champ operator. @@ -20,7 +20,7 @@ cite the original authors when using this software: ## What it does -Given nothing but a point cloud, `DiffusionGeometryJ` builds a discrete +Given nothing but a point cloud, `DiffusionGeometryJL` builds a discrete approximation of the manifold the points are sampled from and lets you do differential geometry on it: take gradients and Hessians, build the exact and Hodge Laplacians on differential forms, measure lengths and angles with the @@ -32,7 +32,7 @@ the heat diffusion of the data — no mesh, no charts, no prescribed metric. ```julia using Pkg -Pkg.add(url="https://github.com/wardjm/DiffusionGeometryJ") +Pkg.add(url="https://github.com/wardjm/DiffusionGeometryJL") ``` Plotting is provided through a package extension that loads only when a @@ -45,7 +45,7 @@ Pkg.add("GLMakie") # or CairoMakie ## Quick start ```julia -using DiffusionGeometryJ +using DiffusionGeometryJL # a point cloud: n points in d ambient dimensions (n × d) data = randn(200, 3) diff --git a/bench/bench.jl b/bench/bench.jl index 185d002..aa8e540 100644 --- a/bench/bench.jl +++ b/bench/bench.jl @@ -1,6 +1,6 @@ #!/usr/bin/env julia -# Timing benchmark for the Julia DiffusionGeometryJ tracer-bullet pipeline. -using DiffusionGeometryJ +# Timing benchmark for the Julia DiffusionGeometryJL tracer-bullet pipeline. +using DiffusionGeometryJL using Random, Statistics, Printf const SIZES = [200, 500, 1000, 2000, 3000, 5000] diff --git a/bench/bench_ops.jl b/bench/bench_ops.jl index 5ea259c..9d53bbc 100644 --- a/bench/bench_ops.jl +++ b/bench/bench_ops.jl @@ -1,6 +1,6 @@ #!/usr/bin/env julia # Timing benchmark for the Julia operator-build path (weak-matrix contractions). -using DiffusionGeometryJ +using DiffusionGeometryJL using Random, Statistics, Printf const SIZES = [500, 1000, 2000, 3000, 5000] diff --git a/bench/betti_vs_ripserer.jl b/bench/betti_vs_ripserer.jl index 6840b5f..1038ef5 100644 --- a/bench/betti_vs_ripserer.jl +++ b/bench/betti_vs_ripserer.jl @@ -1,4 +1,4 @@ -# Compare DiffusionGeometryJ's `betti_numbers` against persistent homology +# Compare DiffusionGeometryJL's `betti_numbers` against persistent homology # (Ripserer) on a few point clouds with known topology. # # Ripserer is NOT a dependency of this package. Run this in a scratch env: @@ -17,7 +17,7 @@ # NOTE: `betti_numbers` needs the FULL coefficient basis # (n_coefficients == n_function_basis) or the harmonic forms are truncated away. -using DiffusionGeometryJ +using DiffusionGeometryJL using Ripserer using Random diff --git a/docs/Project.toml b/docs/Project.toml index 5ec6819..363fcc4 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,5 +1,5 @@ [deps] -DiffusionGeometryJ = "f8140dce-05b1-4e22-80fe-cf341a3061cb" +DiffusionGeometryJL = "f8140dce-05b1-4e22-80fe-cf341a3061cb" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] diff --git a/docs/doctest_setup.jl b/docs/doctest_setup.jl index ae4a53b..90914c8 100644 --- a/docs/doctest_setup.jl +++ b/docs/doctest_setup.jl @@ -7,12 +7,12 @@ # hard to read. It is documented for the reader in `docs/src/index.md`. const DOCTEST_SETUP = quote - using DiffusionGeometryJ + using DiffusionGeometryJL using LinearAlgebra # Nothing unexported is imported here on purpose. The internal helpers documented on # the "Utilities" page (`np_reshape`, the batch helpers, `_from_pointwise_basis`) are - # *not* exported, so their examples spell them `DiffusionGeometryJ.np_reshape(...)` — + # *not* exported, so their examples spell them `DiffusionGeometryJL.np_reshape(...)` — # as a reader would have to. # 60 points on the unit circle in ℝ² — the running example. Its intrinsic diff --git a/docs/make.jl b/docs/make.jl index 1c0a361..cf5a284 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,19 +1,19 @@ using Documenter -using DiffusionGeometryJ +using DiffusionGeometryJL include(joinpath(@__DIR__, "doctest_setup.jl")) -DocMeta.setdocmeta!(DiffusionGeometryJ, :DocTestSetup, DOCTEST_SETUP; recursive=true) +DocMeta.setdocmeta!(DiffusionGeometryJL, :DocTestSetup, DOCTEST_SETUP; recursive=true) makedocs(; - sitename="DiffusionGeometryJ", + sitename="DiffusionGeometryJL", authors="Jeffrey Ward", - modules=[DiffusionGeometryJ], + modules=[DiffusionGeometryJL], doctest=true, checkdocs=:exports, # every exported name must appear in an @docs block # No `warnonly`: an undocumented export, a broken doctest or a dead cross-reference # must fail the build, not warn. format=Documenter.HTML(; - canonical="https://wardjm.github.io/DiffusionGeometryJ", + canonical="https://wardjm.github.io/DiffusionGeometryJL", prettyurls=get(ENV, "CI", "false") == "true", ), pages=[ @@ -32,4 +32,4 @@ makedocs(; ], ) -deploydocs(; repo="github.com/wardjm/DiffusionGeometryJ", devbranch="main") +deploydocs(; repo="github.com/wardjm/DiffusionGeometryJL", devbranch="main") diff --git a/docs/src/api/diffusion.md b/docs/src/api/diffusion.md index af09161..4cfa372 100644 --- a/docs/src/api/diffusion.md +++ b/docs/src/api/diffusion.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL ``` # Diffusion core diff --git a/docs/src/api/geometry.md b/docs/src/api/geometry.md index 43401d4..9b5a688 100644 --- a/docs/src/api/geometry.md +++ b/docs/src/api/geometry.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL DocTestSetup = Main.DOCTEST_SETUP ``` diff --git a/docs/src/api/methods.md b/docs/src/api/methods.md index 11873ed..813b3fa 100644 --- a/docs/src/api/methods.md +++ b/docs/src/api/methods.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL ``` # Numerical methods diff --git a/docs/src/api/operators.md b/docs/src/api/operators.md index 1aa7870..6848aee 100644 --- a/docs/src/api/operators.md +++ b/docs/src/api/operators.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL DocTestSetup = Main.DOCTEST_SETUP ``` diff --git a/docs/src/api/tensors.md b/docs/src/api/tensors.md index 6a6a531..a508b12 100644 --- a/docs/src/api/tensors.md +++ b/docs/src/api/tensors.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL ``` # Tensor fields diff --git a/docs/src/api/utils.md b/docs/src/api/utils.md index 9e2629e..7e8d3c7 100644 --- a/docs/src/api/utils.md +++ b/docs/src/api/utils.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL ``` # Utilities diff --git a/docs/src/conventions.md b/docs/src/conventions.md index 15119e8..1ddb652 100644 --- a/docs/src/conventions.md +++ b/docs/src/conventions.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL DocTestSetup = Main.DOCTEST_SETUP ``` @@ -41,7 +41,7 @@ carries its own [`broadcast_batch_shape`](@ref). julia> batch_shape(dg_function(dg, ones(3, 60))) # three functions in one tensor (3,) -julia> DiffusionGeometryJ.broadcast_batch_shape((3, 4), (4,)) # right-aligned +julia> DiffusionGeometryJL.broadcast_batch_shape((3, 4), (4,)) # right-aligned (3, 4) ``` diff --git a/docs/src/index.md b/docs/src/index.md index 7c28df2..9db32e4 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,9 +1,9 @@ ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL DocTestSetup = Main.DOCTEST_SETUP ``` -# DiffusionGeometryJ +# DiffusionGeometryJL Data-driven calculus, geometry, and topology on point clouds — via heat diffusion and the carré du champ operator. @@ -25,7 +25,7 @@ No mesh, no charts, no prescribed metric. ```julia using Pkg -Pkg.add(url="https://github.com/wardjm/DiffusionGeometryJ") +Pkg.add(url="https://github.com/wardjm/DiffusionGeometryJL") ``` Plotting comes from a package extension that loads when a diff --git a/docs/src/plotting.md b/docs/src/plotting.md index 85b5876..1fdbdc1 100644 --- a/docs/src/plotting.md +++ b/docs/src/plotting.md @@ -7,7 +7,7 @@ functions exist but have no methods, and calling one prints a hint telling you t load a backend. ```julia -using DiffusionGeometryJ +using DiffusionGeometryJL using GLMakie # interactive; or CairoMakie for vector (PDF/SVG/PNG) output dg = from_point_cloud(points) @@ -111,7 +111,7 @@ deliberately absent: ## API ```@meta -CurrentModule = DiffusionGeometryJ +CurrentModule = DiffusionGeometryJL ``` The plot functions have no methods until a Makie backend is loaded, so their examples diff --git a/ext/DiffusionGeometryJMakieExt.jl b/ext/DiffusionGeometryJLMakieExt.jl similarity index 92% rename from ext/DiffusionGeometryJMakieExt.jl rename to ext/DiffusionGeometryJLMakieExt.jl index 7788384..370f33b 100644 --- a/ext/DiffusionGeometryJMakieExt.jl +++ b/ext/DiffusionGeometryJLMakieExt.jl @@ -1,4 +1,4 @@ -# Makie plotting for DiffusionGeometryJ. +# Makie plotting for DiffusionGeometryJL. # # Loaded automatically once the user loads Makie (via GLMakie, CairoMakie, …). # Replaces the Python `diffusion_geometry/visualisation.py` and @@ -7,7 +7,7 @@ # The plotting functions themselves are declared in `src/visualisation/api.jl`; the # `@recipe` calls below add methods to *those* functions (the macro escapes the # function name, so it extends the imported binding rather than shadowing it), which -# is what lets `DiffusionGeometryJ` export names an extension implements. +# is what lets `DiffusionGeometryJL` export names an extension implements. # # Three pieces of `visualisation.py` are deliberately not ported: # @@ -23,7 +23,7 @@ # and locks the aspect ratio of the axis it creates. `LScene` draws a 3D axis by default, # so this is not something Makie gives for free. -module DiffusionGeometryJMakieExt +module DiffusionGeometryJLMakieExt using Makie using Makie: Point, Point2f, Point3f, Vec, Vec3f, lift, to_value @@ -33,13 +33,13 @@ using Statistics: median, mean const GeometryBasics = Makie.GeometryBasics -using DiffusionGeometryJ: +using DiffusionGeometryJL: AbstractTensor, ScalarFunction, VectorField, Form, Tensor02, Tensor02Sym, DIVERGING_COLORMAP, CYCLIC_COLORMAP, ambient_dim, batch_shape, degree, full_tensor, geometry, hodge_star_2_form, immersion_coords, to_ambient, to_pointwise_basis -import DiffusionGeometryJ: +import DiffusionGeometryJL: dgplot, dgplot!, dgscatter, dgscatter!, dgquiver, dgquiver!, dg2form, dg2form!, dg3form, dg3form!, dgellipsoids, dgellipsoids!, dgeiglines, dgeiglines!, dgtangentplanes, dgtangentplanes!, dganimate diff --git a/src/DiffusionGeometryJ.jl b/src/DiffusionGeometryJL.jl similarity index 99% rename from src/DiffusionGeometryJ.jl rename to src/DiffusionGeometryJL.jl index 6c6f251..88c48a8 100644 --- a/src/DiffusionGeometryJ.jl +++ b/src/DiffusionGeometryJL.jl @@ -1,4 +1,4 @@ -module DiffusionGeometryJ +module DiffusionGeometryJL # ── Phase 1: combinatorics + utils ──────────────────────────────────────────── include("utils/basis_utils.jl") diff --git a/src/tensors/base_tensor/base_tensor_space.jl b/src/tensors/base_tensor/base_tensor_space.jl index e13a753..b3e0ce3 100644 --- a/src/tensors/base_tensor/base_tensor_space.jl +++ b/src/tensors/base_tensor/base_tensor_space.jl @@ -123,10 +123,10 @@ gram(space::AbstractTensorSpace) = gram(_u_coeffs(space.dg), cdc_components(spac # Examples ```jldoctest -julia> DiffusionGeometryJ._is_orthonormal(function_space(dg)) +julia> DiffusionGeometryJL._is_orthonormal(function_space(dg)) true -julia> DiffusionGeometryJ._is_orthonormal(vector_field_space(dg)) +julia> DiffusionGeometryJL._is_orthonormal(vector_field_space(dg)) false ``` """ @@ -149,7 +149,7 @@ but the weakest are two orders of magnitude down on the rest. Those are the ambi directions *normal* to the circle, which the metric barely sees: ```jldoctest -julia> vals, vecs = DiffusionGeometryJ._gram_spectrum(vector_field_space(dg)); +julia> vals, vecs = DiffusionGeometryJL._gram_spectrum(vector_field_space(dg)); julia> length(vals) 16 diff --git a/src/utils/basis_conversions.jl b/src/utils/basis_conversions.jl index 5119dd0..5a1db1e 100644 --- a/src/utils/basis_conversions.jl +++ b/src/utils/basis_conversions.jl @@ -26,7 +26,7 @@ coefficients 2 and 3 are non-zero — and by Parseval they carry all of its L² `∫cos²θ = 1/2`: ```jldoctest -julia> c = DiffusionGeometryJ._from_pointwise_basis(reshape(cos.(θ), 60, 1), function_space(dg)); +julia> c = DiffusionGeometryJL._from_pointwise_basis(reshape(cos.(θ), 60, 1), function_space(dg)); julia> findall(>(1e-3), abs.(c)) # supported on the λ = 1 eigenspace alone 2-element Vector{Int64}: @@ -75,7 +75,7 @@ Evaluating the coefficients of `f` back at the 60 sample points recovers `cos θ to the error of the 8-function truncation: ```jldoctest -julia> values = DiffusionGeometryJ._to_pointwise_basis(f.coeffs, function_space(dg); basis_count=8); +julia> values = DiffusionGeometryJL._to_pointwise_basis(f.coeffs, function_space(dg); basis_count=8); julia> size(values) (60,) diff --git a/src/utils/batch_utils.jl b/src/utils/batch_utils.jl index 8104248..3846f1c 100644 --- a/src/utils/batch_utils.jl +++ b/src/utils/batch_utils.jl @@ -16,16 +16,16 @@ function rather than a delegation. Throws `DimensionMismatch` if the shapes conf # Examples ```jldoctest -julia> DiffusionGeometryJ.broadcast_batch_shape((3, 4), (4,)) # right-aligned: (4,) fills the last axis +julia> DiffusionGeometryJL.broadcast_batch_shape((3, 4), (4,)) # right-aligned: (4,) fills the last axis (3, 4) -julia> DiffusionGeometryJ.broadcast_batch_shape((3, 1), (1, 4)) # length-1 axes stretch +julia> DiffusionGeometryJL.broadcast_batch_shape((3, 1), (1, 4)) # length-1 axes stretch (3, 4) -julia> DiffusionGeometryJ.broadcast_batch_shape((), (5,)) # an unbatched tensor joins any batch +julia> DiffusionGeometryJL.broadcast_batch_shape((), (5,)) # an unbatched tensor joins any batch (5,) -julia> DiffusionGeometryJ.broadcast_batch_shape((3,), (4,)) +julia> DiffusionGeometryJL.broadcast_batch_shape((3,), (4,)) ERROR: DimensionMismatch: Incompatible batch shapes: ((3,), (4,)) ``` """ @@ -83,10 +83,10 @@ axes it already has. Julia's own broadcasting then reproduces numpy's semantics: # Examples ```jldoctest -julia> size(DiffusionGeometryJ.pad_batch_dims(zeros(4, 6), 2)) # batch (4,), coeff axis 6 +julia> size(DiffusionGeometryJL.pad_batch_dims(zeros(4, 6), 2)) # batch (4,), coeff axis 6 (1, 4, 6) -julia> size(DiffusionGeometryJ.pad_batch_dims(zeros(4, 6), 1)) # already rank 1: untouched +julia> size(DiffusionGeometryJL.pad_batch_dims(zeros(4, 6), 1)) # already rank 1: untouched (4, 6) ``` """ @@ -106,7 +106,7 @@ rule. Both arrays keep their `ntail` trailing (non-batch) axes. # Examples ```jldoctest -julia> a, b = DiffusionGeometryJ.align_batch_pair(zeros(3, 4, 6), zeros(4, 6)); +julia> a, b = DiffusionGeometryJL.align_batch_pair(zeros(3, 4, 6), zeros(4, 6)); julia> size(a), size(b) # b gained a leading singleton axis ((3, 4, 6), (1, 4, 6)) @@ -129,12 +129,12 @@ einsum; prefer [`pad_batch_dims`](@ref) when plain broadcasting will do. # Examples ```jldoctest -julia> size(DiffusionGeometryJ.broadcast_batch_to(ones(4, 6), (3, 4))) # copied along the new axis +julia> size(DiffusionGeometryJL.broadcast_batch_to(ones(4, 6), (3, 4))) # copied along the new axis (3, 4, 6) julia> A = ones(4, 6); -julia> DiffusionGeometryJ.broadcast_batch_to(A, (4,)) === A # already the target: no copy +julia> DiffusionGeometryJL.broadcast_batch_to(A, (4,)) === A # already the target: no copy true ``` """ @@ -155,7 +155,7 @@ axis, giving `(prod(target), tail...)` — the layout the einsum kernels want. # Examples ```jldoctest -julia> size(DiffusionGeometryJ.broadcast_flatten_batch(ones(4, 6), (3, 4))) # batch (3, 4) → 12 rows +julia> size(DiffusionGeometryJL.broadcast_flatten_batch(ones(4, 6), (3, 4))) # batch (3, 4) → 12 rows (12, 6) ``` """ @@ -174,12 +174,12 @@ return the array together with its leading batch shape. This is the check every # Examples ```jldoctest -julia> _, batch = DiffusionGeometryJ.infer_batch_shape(zeros(3, 5, 16), (16,)); +julia> _, batch = DiffusionGeometryJL.infer_batch_shape(zeros(3, 5, 16), (16,)); julia> batch (3, 5) -julia> DiffusionGeometryJ.infer_batch_shape(zeros(3, 15), (16,); name="VectorField") +julia> DiffusionGeometryJL.infer_batch_shape(zeros(3, 15), (16,); name="VectorField") ERROR: AssertionError: VectorField coefficients must have trailing shape (16,), got (3, 15) ``` """ @@ -201,12 +201,12 @@ Undone by [`restore_batch_dims`](@ref). # Examples ```jldoctest -julia> flat, batch = DiffusionGeometryJ.flatten_batch_dims(zeros(2, 3, 16)); +julia> flat, batch = DiffusionGeometryJL.flatten_batch_dims(zeros(2, 3, 16)); julia> size(flat), batch ((6, 16), (2, 3)) -julia> flat, batch = DiffusionGeometryJ.flatten_batch_dims(zeros(16)); # unbatched: one row, empty batch +julia> flat, batch = DiffusionGeometryJL.flatten_batch_dims(zeros(16)); # unbatched: one row, empty batch julia> size(flat), batch ((1, 16), ()) @@ -230,12 +230,12 @@ Inverse of [`flatten_batch_dims`](@ref): reshape a `(prod(batch), L)` matrix bac ```jldoctest julia> A = reshape(1.0:96.0, 2, 3, 16); -julia> flat, batch = DiffusionGeometryJ.flatten_batch_dims(A); +julia> flat, batch = DiffusionGeometryJL.flatten_batch_dims(A); -julia> DiffusionGeometryJ.restore_batch_dims(flat, batch) == A # a round trip +julia> DiffusionGeometryJL.restore_batch_dims(flat, batch) == A # a round trip true -julia> size(DiffusionGeometryJ.restore_batch_dims(zeros(1, 16), ())) # empty batch → a plain vector +julia> size(DiffusionGeometryJL.restore_batch_dims(zeros(1, 16), ())) # empty batch → a plain vector (16,) ``` """ diff --git a/src/utils/reshape_utils.jl b/src/utils/reshape_utils.jl index bd0a3d5..a433a74 100644 --- a/src/utils/reshape_utils.jl +++ b/src/utils/reshape_utils.jl @@ -18,7 +18,7 @@ every coefficient vector in the package (`(i, a) ↦ i·C + a`, basis index slow Reading order is by rows, not columns — this is what `Base.reshape` would *not* do: ```jldoctest -julia> DiffusionGeometryJ.np_reshape([1 2 3; 4 5 6], 3, 2) +julia> DiffusionGeometryJL.np_reshape([1 2 3; 4 5 6], 3, 2) 3×2 Matrix{Int64}: 1 2 3 4 @@ -36,7 +36,7 @@ It round-trips, so a flattened coefficient vector can always be unpacked again: ```jldoctest julia> A = reshape(1:12, 2, 2, 3); -julia> DiffusionGeometryJ.np_reshape(DiffusionGeometryJ.np_reshape(A, 2, 6), 2, 2, 3) == A +julia> DiffusionGeometryJL.np_reshape(DiffusionGeometryJL.np_reshape(A, 2, 6), 2, 2, 3) == A true ``` """ diff --git a/src/visualisation/api.jl b/src/visualisation/api.jl index 0a049c4..13c080a 100644 --- a/src/visualisation/api.jl +++ b/src/visualisation/api.jl @@ -1,6 +1,6 @@ # Public plotting API. # -# The implementations live in `ext/DiffusionGeometryJMakieExt.jl`, a package +# The implementations live in `ext/DiffusionGeometryJLMakieExt.jl`, a package # extension that loads only once the user has loaded Makie (via a backend such as # GLMakie or CairoMakie). The names are declared here so they are exported and # documented from the package proper, and so `@recipe` in the extension adds @@ -47,7 +47,7 @@ are forwarded to the underlying recipe — see [`dgscatter`](@ref), [`dgquiver`] # Examples ```julia -using GLMakie, DiffusionGeometryJ +using GLMakie, DiffusionGeometryJL θ = range(0, 2π; length=61)[1:60] dg = from_point_cloud([cos.(θ) sin.(θ)]; knn_kernel=16, n_function_basis=8) @@ -177,7 +177,7 @@ being renormalised each frame. Replaces the Python `methods/pde.py::gif_from_fun # Examples ```julia -using GLMakie, DiffusionGeometryJ +using GLMakie, DiffusionGeometryJL u = solve_differential_operator(-laplacian(dg, 0), f, range(0, 2; length=60)) dganimate(u, "heat.mp4"; framerate=30) diff --git a/test/doctests.jl b/test/doctests.jl index 26e89e7..4d01b2a 100644 --- a/test/doctests.jl +++ b/test/doctests.jl @@ -10,11 +10,11 @@ using Documenter include(joinpath(@__DIR__, "..", "docs", "doctest_setup.jl")) -DocMeta.setdocmeta!(DiffusionGeometryJ, :DocTestSetup, DOCTEST_SETUP; recursive=true) +DocMeta.setdocmeta!(DiffusionGeometryJL, :DocTestSetup, DOCTEST_SETUP; recursive=true) @testset "doctests" begin # `manual=true` also runs the `jldoctest` blocks in the manual pages under # `docs/src`, so the examples in the guide are held to the suite too, not just # the ones in docstrings. - doctest(DiffusionGeometryJ; manual=true) + doctest(DiffusionGeometryJL; manual=true) end diff --git a/test/runtests.jl b/test/runtests.jl index 16fa3c8..fe74cf2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,11 @@ using Test using LinearAlgebra -using DiffusionGeometryJ +using DiffusionGeometryJL include("parity.jl") include("pysuite.jl") -@testset "DiffusionGeometryJ" begin +@testset "DiffusionGeometryJL" begin include("test_basis_utils.jl") include("test_regularise.jl") include("test_diffusion_core.jl") diff --git a/test/test_makie_ext.jl b/test/test_makie_ext.jl index 907d7f2..c1f7076 100644 --- a/test/test_makie_ext.jl +++ b/test/test_makie_ext.jl @@ -6,13 +6,13 @@ using CairoMakie using CairoMakie: Makie -using DiffusionGeometryJ: batch_shape, full_tensor +using DiffusionGeometryJL: batch_shape, full_tensor using LinearAlgebra: norm, eigen, Symmetric using Random: MersenneTwister # Loading CairoMakie triggers the package extension; reach into it for the recipe # plot types and internal helpers the structural tests assert against. -const Ext = Base.get_extension(DiffusionGeometryJ, :DiffusionGeometryJMakieExt) +const Ext = Base.get_extension(DiffusionGeometryJL, :DiffusionGeometryJLMakieExt) @assert Ext !== nothing "Makie extension failed to load" # ── Fixtures: a 2D disc and a 3D torus, each with a diffusion geometry ───────── diff --git a/test/test_notebooks.jl b/test/test_notebooks.jl index 3c97570..64e460c 100644 --- a/test/test_notebooks.jl +++ b/test/test_notebooks.jl @@ -18,7 +18,7 @@ using Statistics: mean, median, cor aeq(a, b; rtol=1e-8, atol=1e-10) = isapprox(a, b; rtol=rtol, atol=atol) "Pointwise data of an unbatched tensor as an `(n, C)` matrix (C-order, as Python)." - pointwise(t, n, c) = DiffusionGeometryJ.np_reshape(vec(to_pointwise_basis(t)), n, c) + pointwise(t, n, c) = DiffusionGeometryJL.np_reshape(vec(to_pointwise_basis(t)), n, c) @testset "manifold_diffusion_geometry_intro: torus scalar curvature" begin fx = load_fixture("notebook_curvature") diff --git a/test/test_pyclasses.jl b/test/test_pyclasses.jl index b3bdbc3..68b78c3 100644 --- a/test/test_pyclasses.jl +++ b/test/test_pyclasses.jl @@ -12,7 +12,7 @@ using Combinatorics: combinations using OMEinsum: @ein_str # Internal accessors the tests need: none of these are exported. -using DiffusionGeometryJ: coeffs, space, geometry, batch_shape, np_reshape, +using DiffusionGeometryJL: coeffs, space, geometry, batch_shape, np_reshape, _spectral_decomposition, regularise_fn using SparseArrays: sparse, findnz diff --git a/test/test_pysrc.jl b/test/test_pysrc.jl index 01cc3ca..ffd2133 100644 --- a/test/test_pysrc.jl +++ b/test/test_pysrc.jl @@ -16,7 +16,7 @@ using Combinatorics: combinations # `coeffs` and `np_reshape` are internal; the tests need them to poke at the # coefficient layout, which flattens C-order like numpy. -using DiffusionGeometryJ: coeffs, np_reshape +using DiffusionGeometryJL: coeffs, np_reshape # ── test_cache_properties.py ────────────────────────────────────────────────── @testset "cache_properties" begin diff --git a/test/test_topology.jl b/test/test_topology.jl index ec282da..fe0871b 100644 --- a/test/test_topology.jl +++ b/test/test_topology.jl @@ -5,7 +5,7 @@ # contract. Higher Betti numbers are a spectral-gap heuristic (see the caveats in # src/methods/topology.jl) and are not asserted for their topological value here. -using DiffusionGeometryJ +using DiffusionGeometryJL using Random: MersenneTwister # Build a geometry with the FULL coefficient basis — betti detection needs it.