Skip to content
Snippets Groups Projects
Commit 687595ff authored by Bentriou Mahmoud's avatar Bentriou Mahmoud
Browse files

Tuple => SVector

parent 98a6278c
No related branches found
No related tags found
No related merge requests found
...@@ -281,11 +281,11 @@ function create_abc_euclidean_distance_automaton(m::ContinuousTimeModel, timelin ...@@ -281,11 +281,11 @@ function create_abc_euclidean_distance_automaton(m::ContinuousTimeModel, timelin
# Defined below # Defined below
#struct $(edge_name(:l1, :l1, 1)) <: $(edge_type) transitions::Union{Nothing,Vector{Symbol}} end #struct $(edge_name(:l1, :l1, 1)) <: $(edge_type) transitions::Union{Nothing,Vector{Symbol}} end
@everywhere $(check_constraints(:l1, :l1, 1))(S_time::Float64, S_values::Vector{Float64}, x::Vector{Int}, p::Vector{Float64}, ϵ::Float64) = @everywhere $(check_constraints(:l1, :l1, 1))(S_time::Float64, S_values::Vector{Float64}, x::Vector{Int}, p::Vector{Float64}, ϵ::Float64) =
(tml = $(Tuple(timeline)); (tml = $(SVector{length(timeline)}(timeline));
tml_idx = tml[convert(Int, S_values[$(to_idx(:idx))])]; tml_idx = tml[convert(Int, S_values[$(to_idx(:idx))])];
S_values[$(to_idx(:t))] >= tml_idx) S_values[$(to_idx(:t))] >= tml_idx)
@everywhere $(update_state!(:l1, :l1, 1))(S_time::Float64, S_values::Vector{Float64}, x::Vector{Int}, p::Vector{Float64}, ϵ::Float64) = @everywhere $(update_state!(:l1, :l1, 1))(S_time::Float64, S_values::Vector{Float64}, x::Vector{Int}, p::Vector{Float64}, ϵ::Float64) =
(y_obs = $(Tuple(observations)); (y_obs = $(SVector{length(observations)}(observations));
y_obs_idx = y_obs[convert(Int, S_values[$(to_idx(:idx))])]; y_obs_idx = y_obs[convert(Int, S_values[$(to_idx(:idx))])];
S_values[$(to_idx(:d))] += (S_values[$(to_idx(:n))]-y_obs_idx)^2; S_values[$(to_idx(:d))] += (S_values[$(to_idx(:n))]-y_obs_idx)^2;
S_values[$(to_idx(:idx))] += 1.0; S_values[$(to_idx(:idx))] += 1.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment