File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,19 @@ export logdensity_def
38
38
export basemeasure
39
39
export basekernel
40
40
export productmeasure
41
+
42
+ """
43
+ inssupport(m, x)
44
+ insupport(m)
45
+
46
+ `insupport(m,x)` computes whether `x` is in the support of `m`.
47
+
48
+ `insupport(m)` returns a function, and satisfies
49
+
50
+ insupport(m)(x) == insupport(m, x)
51
+ """
52
+ function insupport end
53
+
41
54
export insupport
42
55
export getdof
43
56
export transport_to
@@ -46,6 +59,8 @@ include("insupport.jl")
46
59
47
60
abstract type AbstractMeasure end
48
61
62
+ AbstractMeasure (m:: AbstractMeasure ) = m
63
+
49
64
using Static: @constprop
50
65
51
66
function Pretty. quoteof (d:: M ) where {M<: AbstractMeasure }
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ function test_interface(μ::M) where {M}
38
38
@testset " $μ " begin
39
39
μ = $ μ
40
40
41
+ @test AbstractMeasure (μ) isa AbstractMeasure
42
+
41
43
# ##########################################################################
42
44
# basemeasure_depth
43
45
static_depth = @inferred basemeasure_depth (μ)
You can’t perform that action at this time.
0 commit comments