function getPlus_semiStart(nSwitches, bVal, semiStart) result(plusWeight)
real(dp), intent(in) :: nSwitches, bVal
type(WeightData_t), intent(in) :: semiStart
real(dp) :: plusWeight
character(*), parameter :: this_routine = "getPlus_semiStart"
ASSERT(nSwitches >= 0.0_dp)
! just set +1 branch probability to 0 if b == 0
if (near_zero(bVal)) then
plusWeight = 0.0_dp
else
plusWeight = semiStart%G * semiStart%zero + semiStart%F * semiStart%plus + &
nSwitches / bVal * (semiStart%G * semiStart%minus + semiStart%F * semiStart%zero)
end if
ASSERT(plusWeight >= 0.0_dp)
end function getPlus_semiStart