@@ -22,34 +22,43 @@ For more details, on the transformation used and other implementation details yo
2222 distributed::Val{SHARED_ARRAY} = Val(false),
2323 rng::AbstractRNG = Random.default_rng(), kwargs...) where {SHARED_ARRAY}
2424
25+ Note, `p_range` is either a vector of tuples for the upper and lower bound or a vector of `Distribution`s.
2526
2627### Example
2728
2829Below we show use of `eFAST` on the Ishigami function.
2930
3031```julia
31- using GlobalSensitivity, QuasiMonteCarlo
32+ using GlobalSensitivity, QuasiMonteCarlo, Distributions
3233
3334function ishi(X)
3435 A= 7
3536 B= 0.1
3637 sin(X[1]) + A*sin(X[2])^2+ B*X[3]^4 *sin(X[1])
3738end
3839
40+ ## define upper and lower limits, a.k.a uniform distributions
3941lb = -ones(4)*π
4042ub = ones(4)*π
4143
42- res1 = gsa(ishi,eFAST(),[[lb[i],ub[i]] for i in 1:4],samples=15000)
44+ res1 = gsa(ishi, eFAST(), [[lb[i],ub[i]] for i in 1:4], samples=15000)
4345
44- ##with batching
46+ # define distributions for the inputs
47+ input_ranges = [Normal(0, 1),
48+ Uniform(-π, π),
49+ Uniform(-π, π),
50+ Uniform(-π, π)]
51+
52+ res2 = gsa(ishi, eFAST(), input_ranges, samples=15000)
53+
54+ ## with batching
4555function ishi_batch(X)
4656 A= 7
4757 B= 0.1
4858 @. sin(X[1,:]) + A*sin(X[2,:])^2+ B*X[3,:]^4 *sin(X[1,:])
4959end
5060
51- res2 = gsa(ishi_batch,eFAST(),[[lb[i],ub[i]] for i in 1:4],samples=15000,batch=true)
52-
61+ res3 = gsa(ishi_batch, eFAST(), [[lb[i],ub[i]] for i in 1:4], samples=15000, batch=true)
5362```
5463"""
5564struct eFAST <: GSAMethod
0 commit comments