I changed my evaluation from 1 to 4 because of your previous answer. It give you very good credits to your choice.
I understand now the reason to not verify the parameter validity on each call to "Value(s)" functions.
But I still think that it should be possible to create an invalid Distribution easily and ask for its validity. I think that parameters validation should be done at only on place and closer to where it is coded. It is only the creator of the class that should know if a class is valid or not. It belongs to the creator to give its user the possibility to know if its actual Distribution is in a valid state or not. The programmer is not necessarily a statistician and should have possibilities to know validity state.
About the validity check in "Value(s)" function, I have no perfect suggestion. I think that it could be the responsibilities of the library user to call IsValid() before using it if he required it. But yes, I would not add this check in "Value(s)" function to have best performance. You are totally right on that.
I put a reminder to come back in a year to see the state, perhaps there will be more users with the same suggestion as me :-) !!! .. perhaps not ;-(
Thanks for your nice feedback!
Good luck and thanks for sharing all that code.
I understand now the reason to not verify the parameter validity on each call to "Value(s)" functions.
But I still think that it should be possible to create an invalid Distribution easily and ask for its validity. I think that parameters validation should be done at only on place and closer to where it is coded. It is only the creator of the class that should know if a class is valid or not. It belongs to the creator to give its user the possibility to know if its actual Distribution is in a valid state or not. The programmer is not necessarily a statistician and should have possibilities to know validity state.
About the validity check in "Value(s)" function, I have no perfect suggestion. I think that it could be the responsibilities of the library user to call IsValid() before using it if he required it. But yes, I would not add this check in "Value(s)" function to have best performance. You are totally right on that.
I put a reminder to come back in a year to see the state, perhaps there will be more users with the same suggestion as me :-) !!! .. perhaps not ;-(
Thanks for your nice feedback!
Good luck and thanks for sharing all that code.