Skip to content

Group distribution-specific helpers under mir.stat.distribution.internal - #390

Merged
jmh530 merged 2 commits into
libmir:masterfrom
jmh530:codex/distribution-internals
Nov 30, 2026
Merged

jmh530 merged 2 commits into
libmir:masterfrom
jmh530:codex/distribution-internals

Conversation

@jmh530

@jmh530 jmh530 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Move 47 distribution-specific modules from mir.stat.internal to mir.stat.distribution.internal and narrow their package-qualified declarations to mir.stat.distribution. Existing public distribution imports continue to work. Update the Meson source list, slow-numerics imports, and Windows x86 CI paths for the move. Meson now also lists fp_categorical and fp_poisson_mode explicitly.

Keep the shared Mahalanobis implementation in mir.stat.internal.mahalanobis. The public distance wrappers and multivariate normal density functions now call its scalar and batch workspace routines directly. This removes the distribution’s dependency on mir.stat.distance while preserving factor representation, triangle selection, and batch summation policy.

Local validation passed:

  • Windows DMD 2.114.0 passed the full native suite (113 modules) and focused DIP1000 tests (8 modules).
  • Ubuntu LDC 1.43.0 passed the OpenBLAS suite (24 modules), with OpenBLAS linkage verified.
  • All 13 documentation-tooling tests passed. All 47 moved modules appear exactly once in the Meson source list, and no tracked references to their former paths remain.

AI-Assisted-By: Codex (GPT-6.2 Astra Medium)

Group the extended-precision distribution implementations, probability
helpers, and normal rectangle routines under the package that uses
them. Narrow their package-qualified declarations to
mir.stat.distribution and preserve the public distribution imports.
Shared Mahalanobis, linear algebra, and standardization helpers remain
in mir.stat.internal.

Update the Meson source list, slow-numerics imports, and Windows x86 CI
paths. Explicitly register fp_categorical and fp_poisson_mode in Meson
alongside the other moved modules.

AI-Assisted-By: Codex (GPT-6.2 Astra Medium)
Route the public distance wrappers and multivariate normal density
calculations through the existing scalar and batch workspace routines
in mir.stat.internal.mahalanobis. This removes the distribution's
dependency on mir.stat.distance while preserving both public APIs.

Pass factor storage, representation, and triangle directly to the
shared routines. Prepared models use their stored lower covariance
or precision factor, and batch distance calls retain the caller's
summation policy.

AI-Assisted-By: Codex (GPT-6.2 Astra Medium)
@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jmh530
jmh530 merged commit 1438b9e into libmir:master Nov 30, 2026
23 checks passed
@jmh530
jmh530 deleted the codex/distribution-internals branch November 30, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant