Skip to content

Commit

Permalink
STASH mkernel
Browse files Browse the repository at this point in the history
  • Loading branch information
oschulz committed Sep 9, 2024
1 parent 336c1d2 commit 8dbdc52
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/combinators/bind.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ See also [`mbind`](@ref).
function mkernel end
export mkernel

@inline mkernel(f_β::MKernel) = f_β
@inline mkernel(f_β, f_c = secondarg) = _generic_mkernel_impl(f_β, f_c)

@inline _generic_mkernel_impl(f_β, f_c) = MKernel(f_β, f_c)
@inline _generic_mkernel_impl(f_β::MKernel, ::typeof(secondarg)) = f_β


"""
struct MeasureBase.MKernel <: Function
Expand Down Expand Up @@ -139,7 +145,6 @@ export mbind

@inline mbind(f_β) = Base.Fix1(mbind, f_β)

# ToDo: Store MKernel in Bind instead of separate fields f_β and f_c?
@inline mbind(f_k::MKernel, α::AbstractMeasure) = mbind(f_k.f_β, α, f_k.f_c)

#@inline mbind(f_β, α::AbstractMeasure, f_c = getsecond) = _generic_mbind_impl(f_β, α, f_c) --- temporary ---
Expand Down Expand Up @@ -169,6 +174,9 @@ struct Bind{FK,M<:AbstractMeasure,FC} <: AbstractMeasure
f_c::FC
end

# ToDo: Store MKernel in Bind instead of separate fields f_β and f_c?



"""
MeasureBase.transportmeasure(μ::Bind, x)::AbstractMeasure
Expand Down

0 comments on commit 8dbdc52

Please sign in to comment.