| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | nSwitches | |||
| real(kind=dp), | intent(in) | :: | bVal | |||
| type(WeightData_t), | intent(in) | :: | single |
function getMinus_single(nSwitches, bVal, single) result(minusWeight) real(dp), intent(in) :: nSwitches, bVal type(WeightData_t), intent(in) :: single real(dp) :: minusWeight character(*), parameter :: this_routine = "getMinus_single" ASSERT(nSwitches >= 0.0_dp) ! change that, to make it independend if b is zero if (near_zero(bVal)) then ! make it only depend on f and nSwitches ! will be normalized to 1 anyway in the calcStayingProb function minusWeight = single%F + nSwitches * single%G else minusWeight = single%F + nSwitches * single%G / bVal end if ASSERT(minusWeight >= 0.0_dp) end function getMinus_single