File tree Expand file tree Collapse file tree 8 files changed +10
-9
lines changed Expand file tree Collapse file tree 8 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
name = " MeasureBase"
2
2
uuid = " fa1605e6-acd5-459c-a1e6-7e635759db14"
3
3
authors = [
" Chad Scherrer <[email protected] > and contributors" ]
4
- version = " 0.9.4 "
4
+ version = " 0.9.5 "
5
5
6
6
[deps ]
7
7
Compat = " 34da2185-b29b-5c13-b0c7-acf172513d20"
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ include("combinators/smart-constructors.jl")
124
124
include (" combinators/powerweighted.jl" )
125
125
include (" combinators/conditional.jl" )
126
126
127
+ include (" standard/stdmeasure.jl" )
127
128
include (" standard/stdnormal.jl" )
128
129
include (" standard/stduniform.jl" )
129
130
include (" standard/stdexponential.jl" )
Original file line number Diff line number Diff line change @@ -19,7 +19,5 @@ macro useproxy(M)
19
19
@inline $ MeasureBase. basemeasure (μ:: $M ) = basemeasure (proxy (μ))
20
20
21
21
@inline $ MeasureBase. basemeasure_depth (μ:: $M ) = basemeasure_depth (proxy (μ))
22
-
23
- @inline $ MeasureBase. testvalue (μ:: $M ) = testvalue (proxy (μ))
24
22
end
25
23
end
Original file line number Diff line number Diff line change 1
- struct StdExponential <: AbstractMeasure end
1
+ struct StdExponential <: StdMeasure end
2
2
3
3
export StdExponential
4
4
Original file line number Diff line number Diff line change
1
+ abstract type StdMeasure <: AbstractMeasure end
2
+
3
+ StdMeasure (:: typeof (rand)) = StdUniform ()
4
+ StdMeasure (:: typeof (randn)) = StdNormal ()
5
+ StdMeasure (:: typeof (randexp)) = StdExponential ()
Original file line number Diff line number Diff line change 1
- struct StdNormal <: AbstractMeasure end
1
+ struct StdNormal <: StdMeasure end
2
2
3
3
export StdNormal
4
4
Original file line number Diff line number Diff line change 1
- struct StdUniform <: AbstractMeasure end
1
+ struct StdUniform <: StdMeasure end
2
2
3
3
export StdUniform
4
4
Original file line number Diff line number Diff line change @@ -37,23 +37,20 @@ test_measures = [
37
37
Dirac (0 ) + Dirac (1 )
38
38
Dirac (0.0 ) + Lebesgue (ℝ)
39
39
SpikeMixture (Lebesgue (ℝ), 0.2 )
40
-
41
40
StdNormal ()
42
41
StdNormal ()^ 3
43
42
StdNormal ()^ (2 , 3 )
44
43
3 * StdNormal ()
45
44
0.2 * StdNormal () + 0.8 * Dirac (0.0 )
46
45
Dirac (0.0 ) + StdNormal ()
47
46
SpikeMixture (StdNormal (), 0.2 )
48
-
49
47
StdUniform ()
50
48
StdUniform ()^ 3
51
49
StdUniform ()^ (2 , 3 )
52
50
3 * StdUniform ()
53
51
0.2 * StdUniform () + 0.8 * Dirac (0.0 )
54
52
Dirac (0.0 ) + StdUniform ()
55
53
SpikeMixture (StdUniform (), 0.2 )
56
-
57
54
StdExponential ()^ 3
58
55
StdExponential ()^ (2 , 3 )
59
56
3 * StdExponential ()
You can’t perform that action at this time.
0 commit comments