Skip to content

Commit

Permalink
Nothing or missing
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Nov 15, 2024
1 parent 5ceaabf commit 8ee1439
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/types/abstract_hmm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ function obs_distributions end
transition_matrix(hmm::AbstractHMM, ::Nothing) = transition_matrix(hmm)
log_transition_matrix(hmm::AbstractHMM, ::Nothing) = log_transition_matrix(hmm)
obs_distributions(hmm::AbstractHMM, ::Nothing) = obs_distributions(hmm)
obs_distributions(hmm::AbstractHMM, control, ::Missing) = obs_distributions(hmm, control)
function obs_distributions(hmm::AbstractHMM, control, ::Union{Nothing,Missing})
return obs_distributions(hmm, control)
end

previous_obs(::AbstractHMM{false}, obs_seq::AbstractVector, t::Integer) = missing
previous_obs(::AbstractHMM{false}, obs_seq::AbstractVector, t::Integer) = nothing
previous_obs(::AbstractHMM{true}, obs_seq::AbstractVector, t::Integer) = obs_seq[t - 1]

"""
Expand Down

0 comments on commit 8ee1439

Please sign in to comment.