From 3813ba051c2a804cdb33173c1c1f74f14b551a87 Mon Sep 17 00:00:00 2001 From: Kai Xu Date: Thu, 25 Jul 2024 12:50:29 +0200 Subject: [PATCH] feat(wip): port reemannian hmc from research repo Signed-off-by: Kai Xu --- src/AdvancedHMC.jl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/AdvancedHMC.jl b/src/AdvancedHMC.jl index 97866c18..b5a25af4 100644 --- a/src/AdvancedHMC.jl +++ b/src/AdvancedHMC.jl @@ -142,9 +142,17 @@ module Experimental using ..AdvancedHMC: @unpack, TYPEDEF, TYPEDFIELDS, AbstractScalarOrVec, AbstractLeapfrog, step, step_size import ..AdvancedHMC: ∂H∂θ, ∂H∂r, DualValue, PhasePoint, phasepoint, step include("riemannian/integrator.jl") - include("riemannian/hamiltonian.jl") - include("riemannian/metric.jl") export GeneralizedLeapfrog + + import AdvancedHMC: _rand + using AdvancedHMC: AbstractMetric, PhasePoint + using LinearAlgebra: eigen, cholesky, Symmetric, Diagonal + include("riemannian/metric.jl") + export DenseRiemannianMetric + + import AdvancedHMC: DualValue, phasepoint, neg_energy, ∂H∂θ, ∂H∂r + using LinearAlgebra: logabsdet, tr + include("riemannian/hamiltonian.jl") end include("abstractmcmc.jl")