Commit 2f7404f0 authored by Victor's avatar Victor
Browse files

minor updates

parent d86fe5df
Pipeline #93014 failed with stage
in 19 minutes and 35 seconds
...@@ -10,9 +10,9 @@ $(TYPEDEF) ...@@ -10,9 +10,9 @@ $(TYPEDEF)
""" """
mutable struct Agent{A<:Ancestors,R<:Rates,T<:Tuple,U,V} <: AbstractAgent{A,R} mutable struct Agent{A<:Ancestors,R<:Rates,T<:Tuple,U,V} <: AbstractAgent{A,R}
# history of traits for geotraits # history of traits for geotraits
x_history::Array{Any,1} x_history::Vector
# birth time of ancestors # birth time of ancestors
t_history::Array{U,1} t_history::Vector{U}
# death rate # death rate
d::V d::V
#birth rate #birth rate
......
...@@ -53,6 +53,7 @@ $(TYPEDEF) ...@@ -53,6 +53,7 @@ $(TYPEDEF)
A real space with dimension N and type T A real space with dimension N and type T
""" """
struct RealSpace{N,T} <: AbstractStatSpace{N,T,IsFinite{false}} end struct RealSpace{N,T} <: AbstractStatSpace{N,T,IsFinite{false}} end
RealSpace(N) = RealSpace{N,Float64}()
""" """
$(TYPEDEF) $(TYPEDEF)
A natural space with dimension N and type T A natural space with dimension N and type T
......
...@@ -63,10 +63,10 @@ function run!(w::World{A,S,T},alg::L,tend::Number,b,d; ...@@ -63,10 +63,10 @@ function run!(w::World{A,S,T},alg::L,tend::Number,b,d;
end end
""" """
function _correct_timedep!(p::Dict) function _check_timedep(b,d)
checks time dependency of birth and death functions, checks number of arguments of functions,
and overloads the function if not provided and throws error if problem
""" """
function _check_timedep(b,d) function _check_timedep(b,d)
if numargs(b) < 2 if numargs(b) < 2
......
# using Test b(X,t) = gaussian(X[1],0.,sigma_K)
# using Revise d(X,Y,t) = gaussian(X[1],Y[1],sigma_a)/K0
# using ABMEv p = Dict{String,Any}();@pack! p = d,b
# using UnPack @testset "Utils" begin
# @test numargs(d) == 3
# b(X) = gaussian(X[1],0.,sigma_K) @test numargs(b) == 2
# d(X,Y) = gaussian(X[1],Y[1],sigma_a)/K0 end
# p = Dict{String,Any}();@pack! p = d,b
# X = [.5]; Y = [.6];t = 0.
# _correct_timedep(p)
# @testset "Utils" begin
# @test numargs(ABMEv.d) == 3
# @test numargs(ABMEv.b) == 2
# ABMEv.b(X,t) == b(X)
# 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