-
Notifications
You must be signed in to change notification settings - Fork 12
/
BridgeStan.jl
55 lines (49 loc) · 1.37 KB
/
BridgeStan.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module BridgeStan
export StanModel,
name,
model_info,
param_num,
param_unc_num,
param_names,
param_unc_names,
param_constrain!,
param_unconstrain!,
param_unconstrain_json!,
log_density_gradient!,
log_density_hessian!,
log_density_hessian_vector_product!,
param_constrain,
param_unconstrain,
param_unconstrain_json,
log_density,
log_density_gradient,
log_density_hessian,
log_density_hessian_vector_product,
get_bridgestan_path,
set_bridgestan_path!,
compile_model,
StanRNG,
new_rng
include("model.jl")
include("download.jl")
include("compile.jl")
"""
StanModel(;stan_file, stanc_args=[], make_args=[], data="", seed=204)
Deprecated; use the normal constructor, StanModel(...), with a path to a `.stan` file, instead.
Construct a StanModel instance from a `.stan` file, compiling if necessary.
This is equivalent to calling `compile_model` and then the original constructor of StanModel.
"""
function StanModel(;
stan_file::String,
stanc_args::AbstractVector{String} = String[],
make_args::AbstractVector{String} = String[],
data::String = "",
seed = 204,
)
Base.depwarn(
"StanModel(;stan_file,... ) is deprecated. Use the normal constructor, StanModel(...) instead.",
:StanModel,
)
StanModel(stan_file, data, seed; stanc_args, make_args)
end
end