Skip to content

Remove Colt dependency, replace with commons-math4-legacy#45

Merged
walterxie merged 2 commits intomasterfrom
remove-colt-dependency
Mar 16, 2026
Merged

Remove Colt dependency, replace with commons-math4-legacy#45
walterxie merged 2 commits intomasterfrom
remove-colt-dependency

Conversation

@alexeid
Copy link
Member

@alexeid alexeid commented Mar 16, 2026

Summary

  • Replace vendored colt.jar with commons-math4-legacy (already a dependency), removing a dependency rather than adding one
  • Unblocks publishing beast3 to Maven Central (colt.jar was a local jar not on Central)
  • Mark beagle as optional so it does not block Maven Central consumers
  • Add Maven Central release job to CI workflow (triggered by v* tags)

Changes

File Change
RobustEigenDecomposition Accept/return double[][] instead of Colt matrix types; inline symmetry check
RobustSingularValueDecomposition Accept/return double[][] instead of Colt matrix types
ColtEigenSystem Use LUDecomposition from commons-math4 for matrix inverse
ComplexColtEigenSystem Adapt to new return types
KernelDensityEstimator2D Replace DoubleArrayList/Descriptive.quantile() with sorted-array quantile
BinaryCovarionModelTest cern.colt.Arrays to java.util.Arrays
module-info.java (both) Remove requires colt
pom.xml (both) Remove colt dep, mark beagle optional
ci-publish.yml Remove colt steps, add Maven Central release on v* tags

Test plan

  • mvn verify passes (all tests green, zero failures)
  • Manual testing of substitution models that use ColtEigenSystem (e.g. GTR, HKY, BinaryCovarion)
  • Manual testing of ComplexColtEigenSystem path (non-reversible models)
  • Manual testing of KernelDensityEstimator2D (TreeAnnotator HPD contours)

Closes #44

@alexeid alexeid requested a review from walterxie March 16, 2026 00:11
walterxie added a commit that referenced this pull request Mar 16, 2026
alexeid added a commit that referenced this pull request Mar 16, 2026
…ValueDecomposition

Verifies eigenvalues/eigenvectors and singular values against known
matrices (analytical) and rate matrices from transprob.R ground truth
(4x4 equal freq, 4x4 extreme rates, 20x20 amino acid scale).

Eigen tests verify A*V=V*D property; SVD tests verify A=U*S*V^T
reconstruction, orthogonality, rank, and ordering. #45
alexeid added a commit that referenced this pull request Mar 16, 2026
…ValueDecomposition

Verifies eigenvalues/eigenvectors and singular values against known
matrices (analytical) and rate matrices from transprob.R ground truth
(4x4 equal freq, 4x4 extreme rates, 20x20 amino acid scale).

Eigen tests verify A*V=V*D property; SVD tests verify A=U*S*V^T
reconstruction, orthogonality, rank, and ordering. #45
alexeid added 2 commits March 16, 2026 16:00
Replace vendored colt.jar with commons-math4-legacy (already a dependency)
to unblock publishing beast3 to Maven Central.

- RobustEigenDecomposition: accept/return double[][] instead of Colt types
- RobustSingularValueDecomposition: same
- ColtEigenSystem: use LUDecomposition from commons-math4 for matrix inverse
- ComplexColtEigenSystem: adapt to new return types
- KernelDensityEstimator2D: replace DoubleArrayList/Descriptive.quantile()
- Mark beagle dependency as optional in both modules
- Add Maven Central release job to CI (triggered by v* tags)
- Remove colt.jar, colt module-info, and CI colt install/deploy steps

Closes #44
…ValueDecomposition

Verifies eigenvalues/eigenvectors and singular values against known
matrices (analytical) and rate matrices from transprob.R ground truth
(4x4 equal freq, 4x4 extreme rates, 20x20 amino acid scale).

Eigen tests verify A*V=V*D property; SVD tests verify A=U*S*V^T
reconstruction, orthogonality, rank, and ordering. #45
@alexeid alexeid force-pushed the remove-colt-dependency branch from d1cf5f2 to f285650 Compare March 16, 2026 03:01
@walterxie walterxie merged commit eeb5327 into master Mar 16, 2026
1 check passed
alexeid added a commit that referenced this pull request Mar 18, 2026
Colt was replaced by commons-math4-legacy in PR #45.
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.

Replace Colt dependency with commons-math4-legacy

2 participants