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 11name = " MeasureBase"
22uuid = " fa1605e6-acd5-459c-a1e6-7e635759db14"
33authors = [
" Chad Scherrer <[email protected] > and contributors" ]
4- version = " 0.9.4 "
4+ version = " 0.9.5 "
55
66[deps ]
77Compat = " 34da2185-b29b-5c13-b0c7-acf172513d20"
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ include("combinators/smart-constructors.jl")
124124include (" combinators/powerweighted.jl" )
125125include (" combinators/conditional.jl" )
126126
127+ include (" standard/stdmeasure.jl" )
127128include (" standard/stdnormal.jl" )
128129include (" standard/stduniform.jl" )
129130include (" standard/stdexponential.jl" )
Original file line number Diff line number Diff line change @@ -19,7 +19,5 @@ macro useproxy(M)
1919 @inline $ MeasureBase. basemeasure (μ:: $M ) = basemeasure (proxy (μ))
2020
2121 @inline $ MeasureBase. basemeasure_depth (μ:: $M ) = basemeasure_depth (proxy (μ))
22-
23- @inline $ MeasureBase. testvalue (μ:: $M ) = testvalue (proxy (μ))
2422 end
2523end
Original file line number Diff line number Diff line change 1- struct StdExponential <: AbstractMeasure end
1+ struct StdExponential <: StdMeasure end
22
33export StdExponential
44
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
22
33export StdNormal
44
Original file line number Diff line number Diff line change 1- struct StdUniform <: AbstractMeasure end
1+ struct StdUniform <: StdMeasure end
22
33export StdUniform
44
Original file line number Diff line number Diff line change @@ -37,23 +37,20 @@ test_measures = [
3737 Dirac (0 ) + Dirac (1 )
3838 Dirac (0.0 ) + Lebesgue (ℝ)
3939 SpikeMixture (Lebesgue (ℝ), 0.2 )
40-
4140 StdNormal ()
4241 StdNormal ()^ 3
4342 StdNormal ()^ (2 , 3 )
4443 3 * StdNormal ()
4544 0.2 * StdNormal () + 0.8 * Dirac (0.0 )
4645 Dirac (0.0 ) + StdNormal ()
4746 SpikeMixture (StdNormal (), 0.2 )
48-
4947 StdUniform ()
5048 StdUniform ()^ 3
5149 StdUniform ()^ (2 , 3 )
5250 3 * StdUniform ()
5351 0.2 * StdUniform () + 0.8 * Dirac (0.0 )
5452 Dirac (0.0 ) + StdUniform ()
5553 SpikeMixture (StdUniform (), 0.2 )
56-
5754 StdExponential ()^ 3
5855 StdExponential ()^ (2 , 3 )
5956 3 * StdExponential ()
You can’t perform that action at this time.
0 commit comments