Skip to content

Commit 003199a

Browse files
committed
make named tuple outputs consistent
1 parent c5196e5 commit 003199a

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SequentialSamplingModels"
22
uuid = "0e71a2a6-2b30-4447-8742-d083a85e82d1"
33
authors = ["itsdfish"]
4-
version = "0.11.7"
4+
version = "0.11.8"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"

src/ClassicMDFT.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ function rand(
121121
n_alternatives = size(M, 1)
122122
x = fill(0.0, n_alternatives)
123123
Δμ = fill(0.0, n_alternatives)
124-
choices = fill(0, n_sim)
125-
rts = fill(0.0, n_sim)
124+
choice = fill(0, n_sim)
125+
rt = fill(0.0, n_sim)
126126
CM = dist.C * M
127127
for i 1:n_sim
128-
choices[i], rts[i] = _rand(rng, dist, x, Δμ, CM)
128+
choice[i], rt[i] = _rand(rng, dist, x, Δμ, CM)
129129
x .= 0.0
130130
end
131-
return (; choices, rts)
131+
return (; choice, rt)
132132
end
133133

134134
rand(dist::ClassicMDFT, M::AbstractArray;) = rand(Random.default_rng(), dist, M)

src/LCA.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ function rand(rng::AbstractRNG, dist::AbstractLCA, n_sim::Int; Δt = 0.001)
101101
n = length(dist.ν)
102102
x = fill(0.0, n)
103103
Δμ = fill(0.0, n)
104-
choices = fill(0, n_sim)
105-
rts = fill(0.0, n_sim)
104+
choice = fill(0, n_sim)
105+
rt = fill(0.0, n_sim)
106106
for i 1:n_sim
107-
choices[i], rts[i] = _rand(rng, dist, x, Δμ; Δt)
107+
choice[i], rt[i] = _rand(rng, dist, x, Δμ; Δt)
108108
x .= 0.0
109109
end
110-
return (; choices, rts)
110+
return (; choice, rt)
111111
end
112112

113113
function _rand(rng::AbstractRNG, dist::AbstractLCA, x, Δμ; Δt = 0.001)

src/MDFT.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,16 @@ function rand(
153153
x = fill(0.0, n_options)
154154
Δμ = fill(0.0, n_options)
155155
ϵ = fill(0.0, n_options)
156-
choices = fill(0, n_sim)
157-
rts = fill(0.0, n_sim)
156+
choice = fill(0, n_sim)
157+
rt = fill(0.0, n_sim)
158158
dist._CM = dist.C * M * dist.γ
159159
distances = compute_distances(dist, M)
160160
dist.S = compute_feedback_matrix(dist, distances)
161161
for i 1:n_sim
162-
choices[i], rts[i] = _rand(rng, dist, x, Δμ; Δt)
162+
choice[i], rt[i] = _rand(rng, dist, x, Δμ; Δt)
163163
x .= 0.0
164164
end
165-
return (; choices, rts)
165+
return (; choice, rt)
166166
end
167167

168168
rand(dist::MDFT, M::AbstractArray; Δt = 0.001) = rand(Random.default_rng(), dist, M; Δt)

0 commit comments

Comments
 (0)