Skip to content

Commit

Permalink
return Float64 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
abraunst committed Feb 21, 2024
1 parent 5e314c7 commit ffd5aee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/recursive_bp_factor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ prob_xy(wᵢ::RecursiveBPFactor, yₖ, xₖ, xᵢ, dᵢ) = prob_xy(wᵢ, yₖ, x
"P(yₐᵦ|yₐ,yᵦ,xᵢᵗ)"
prob_yy(wᵢ::RecursiveBPFactor, y, y1, y2, xᵢ, d1, d2) = prob_yy(wᵢ::RecursiveBPFactor, y, y1, y2, xᵢ)
prob_yy(wᵢ::RecursiveBPFactor, y, y1, y2, xᵢ) = error("Not implemented")
prob_y0(wᵢ::RecursiveBPFactor, y, xᵢᵗ) = y == 1
prob_y0(wᵢ::RecursiveBPFactor, y, xᵢᵗ)::Float64 = y == 1

##############################################
#### the next methods are optional
Expand Down Expand Up @@ -124,10 +124,10 @@ function compute_prob_ys(wᵢ::Vector{U}, qi::Int, μin::Vector{M2}, ψout, T, s
B, lz + lz1 + lz2, d1 + d2
end

Minit = [[float(prob_y0(wᵢ[t], y, xᵢ)) for _ in 1:1,
_ in 1:1,
Minit = [[prob_y0(wᵢ[t], y, xᵢ) for _ in 1:1,
_ in 1:1,
y in 1:nstates(wᵢ[t],0),
xᵢ in 1:qi]
xᵢ in 1:qi]
for t=1:T+1]
init = (M2(Minit), 0.0, 0)
dest, (full, logzᵢ,) = cavity(B, op, init)
Expand Down

0 comments on commit ffd5aee

Please sign in to comment.