Skip to content

Commit

Permalink
Dev (#254)
Browse files Browse the repository at this point in the history
Some minor changes:
- Change order of arguments in `simulate`
- Limit version for `NestedTuples`
- New method for `iid`
- Rewind version for release
  • Loading branch information
cscherrer authored Apr 9, 2021
1 parent fd50a7c commit 0440210
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Soss"
uuid = "8ce77f84-9b61-11e8-39ff-d17a774bf41c"
author = ["Chad Scherrer <chad.scherrer@gmail.com>"]
version = "0.19.0"
version = "0.17.0"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down Expand Up @@ -56,7 +56,7 @@ MacroTools = "0.5"
MappedArrays = "0.3, 0.4"
MeasureTheory = "0.6,0.7"
NamedTupleTools = "0.12, 0.13"
NestedTuples = "0.1,0.2, 0.3"
NestedTuples = "0.3"
RecipesBase = "0.7,0.8, 1"
Reexport = "1"
Requires = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/Soss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ include("distributions/iid.jl")
# include("distributions/markovchain.jl")

include("primitives/rand.jl")
include("simulate.jl")
include("primitives/simulate.jl")
include("primitives/logdensity.jl")
include("primitives/xform.jl")
include("primitives/likelihood-weighting.jl")
Expand Down
1 change: 1 addition & 0 deletions src/distributions/iid.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export iid

iid(n) = dist -> (dist ^ n)
iid(n::Int...) = dist -> (dist ^ n)
2 changes: 1 addition & 1 deletion src/simulate.jl → src/primitives/simulate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ using MeasureTheory: AbstractMeasure

simulate::AbstractMeasure; trace_assignments=false) = simulate(Random.GLOBAL_RNG, μ; trace_assignments)

simulate(rng::AbstractRNG, μ::AbstractMeasure; trace_assignments=false) = rand(rng, sampletype(μ), μ)
simulate(rng::AbstractRNG, μ::AbstractMeasure; trace_assignments=false) = rand(rng, μ)

@gg function _simulate(M::Type{<:TypeLevel}, _m::Model, _args, trace_assignments::Val{V}) where {V}
trace_assignments = V
Expand Down

2 comments on commit 0440210

@cscherrer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/33931

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.17.0 -m "<description of version>" 0440210c71bdb6c69bf7b1930043e29bd19da3a4
git push origin v0.17.0

Please sign in to comment.