Skip to content

Commit

Permalink
Nothing or missing
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored and fausto-mpj committed Nov 21, 2024
1 parent 06215d1 commit dd09a01
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 dd09a01

Please sign in to comment.