Commit 66637f59 authored by Victor's avatar Victor
Browse files

small fix

parent b9dd0eab
......@@ -60,9 +60,9 @@ and return the last generations, dropping the youngest ones
"""
function get_xhist(world::Vector{Agent{T}},geotrait = false) where T
hist = minimum(get_nancestors.(world))
ntraits = get_dim(first(worldall));
xhist = zeros(length(worldall), hist, ntraits + geotrait);
for (i,a) in enumerate(worldall)
ntraits = get_dim(first(world));
xhist = zeros(length(world), hist, ntraits + geotrait);
for (i,a) in enumerate(world)
xhist[i,:,1:end-geotrait] = get_xhist(a)[:,end-hist+1:end]';
if geotrait
xhist[i,:,ntraits+geotrait] = cumsum(get_xhist(a,1))[end-hist+1:end]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment