Skip to content

Commit 4fba750

Browse files
committed
Change to AbstractMCMCEnsemble, dep AbstractMCMCParallel
1 parent 3a83808 commit 4fba750

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

docs/src/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ AbstractMCMC.sample(
2828
::AbstractRNG,
2929
::AbstractMCMC.AbstractModel,
3030
::AbstractMCMC.AbstractSampler,
31-
::AbstractMCMC.AbstractMCMCParallel,
31+
::AbstractMCMC.AbstractMCMCEnsemble,
3232
::Integer,
3333
::Integer,
3434
)

src/AbstractMCMC.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,36 +48,39 @@ An `AbstractModel` represents a generic model type that can be used to perform i
4848
abstract type AbstractModel end
4949

5050
"""
51-
AbstractMCMCParallel
51+
AbstractMCMCEnsemble
5252
53-
An `AbstractMCMCParallel` algorithm represents a specific algorithm for sampling MCMC chains
53+
An `AbstractMCMCEnsemble` algorithm represents a specific algorithm for sampling MCMC chains
5454
in parallel.
5555
"""
56-
abstract type AbstractMCMCParallel end
56+
abstract type AbstractMCMCEnsemble end
57+
58+
# Deprecate the old name AbstractMCMCParallel in favor of AbstractMCMCEnsemble
59+
Base.@deprecate_binding AbstractMCMCParallel AbstractMCMCEnsemble false
5760

5861
"""
5962
MCMCThreads
6063
6164
The `MCMCThreads` algorithm allows users to sample MCMC chains in parallel using multiple
6265
threads.
6366
"""
64-
struct MCMCThreads <: AbstractMCMCParallel end
67+
struct MCMCThreads <: AbstractMCMCEnsemble end
6568

6669
"""
6770
MCMCDistributed
6871
6972
The `MCMCDistributed` algorithm allows users to sample MCMC chains in parallel using multiple
7073
processes.
7174
"""
72-
struct MCMCDistributed <: AbstractMCMCParallel end
75+
struct MCMCDistributed <: AbstractMCMCEnsemble end
7376

7477

7578
"""
7679
MCMCSerial
7780
7881
The `MCMCSerial` algorithm allows users to sample serially, with no thread or process parallelism.
7982
"""
80-
struct MCMCSerial <: AbstractMCMCParallel end
83+
struct MCMCSerial <: AbstractMCMCEnsemble end
8184

8285
include("samplingstats.jl")
8386
include("logging.jl")

src/sample.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ end
6161
function StatsBase.sample(
6262
model::AbstractModel,
6363
sampler::AbstractSampler,
64-
parallel::AbstractMCMCParallel,
64+
parallel::AbstractMCMCEnsemble,
6565
N::Integer,
6666
nchains::Integer;
6767
kwargs...
@@ -80,7 +80,7 @@ function StatsBase.sample(
8080
rng::Random.AbstractRNG,
8181
model::AbstractModel,
8282
sampler::AbstractSampler,
83-
parallel::AbstractMCMCParallel,
83+
parallel::AbstractMCMCEnsemble,
8484
N::Integer,
8585
nchains::Integer;
8686
kwargs...

0 commit comments

Comments
 (0)