You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there seems to be no available documentation on type conversion within Rev. Of course, most of the time this is just fine. But I've just spent a few hours trying to sort out a problem, which ultimately arose because (1-b) with b a Probability, resulted in Real rather than RealPos, and this ultimately led to the fn rate matrix function to reject the input matrix with rates. I've found a work-around by converting the result explicitly using Probability(), but this was not overtly documented, as far as I could see.
(I have not managed to infer this information from studying the C++ source; granted, I am not very experienced with the overall code. But luckily for me, a reference to Probability() is present in here...)
I can see several things that it'd be nice to have:
(1) perhaps check if automatic conversion by subtraction can go for the most restricted type possible, as is already the behavior with many other operations?
(2) perhaps add more explicit conversion operators in Rev, specifically RealPos() with the analogous behavior to Probability()?
(3) add info about Probability() into the open documentation.
The text was updated successfully, but these errors were encountered:
Currently, there seems to be no available documentation on type conversion within Rev. Of course, most of the time this is just fine. But I've just spent a few hours trying to sort out a problem, which ultimately arose because (1-b) with b a Probability, resulted in Real rather than RealPos, and this ultimately led to the fn rate matrix function to reject the input matrix with rates. I've found a work-around by converting the result explicitly using Probability(), but this was not overtly documented, as far as I could see.
(I have not managed to infer this information from studying the C++ source; granted, I am not very experienced with the overall code. But luckily for me, a reference to Probability() is present in here...)
I can see several things that it'd be nice to have:
(1) perhaps check if automatic conversion by subtraction can go for the most restricted type possible, as is already the behavior with many other operations?
(2) perhaps add more explicit conversion operators in Rev, specifically RealPos() with the analogous behavior to Probability()?
(3) add info about Probability() into the open documentation.
The text was updated successfully, but these errors were encountered: