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
{{ message }}
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
I am using Accord.Statistics and Accord.Math.Optimization and there are so much private properties that (imho) sould not be.
Examples:
On Accord.Statistics.Distributions.Univariate, most of the distributions do not expose the parameters as properties (exposing getter would be OK). Example: WeibullDistribution do not expose scale and shape.
On Accord.Math.Optimization, the class NelderMead does not allow you to change the LowerBounds and UpperBounds. The properties only have a getter. I am changing the private fields with reflection without issues, but using reflection for this purposes is annoying.
There are more examples, but this are the last I used and came to my mind.
Is this intended? and if so, why?
Making all the relevant, non-implementation-breaking stuff public, or in the case of the statistical distributions at least exposing a getter would be great.
The text was updated successfully, but these errors were encountered:
Thank you for the suggestions: it is almost certain that this information hiding was not intended. I will go through the properties you mention, please let me know of any other points where you think a getter should have been available but for some unknown reason, isn't.
However, regarding your second point about NelderMead: The properties you are referring to are arrays, so in this case you can set their elements directly, without using reflection or even a setter, by using nelderMead.UpperBound[0] = 42).
The properties you are referring to are arrays, so in this case you can set their elements directly
🤦♂️ You are totally correct. I was so blindly trying to assign the array (as nelderMead.UpperBound = new double[] {...};) that completely missed that.
I am using Accord.Statistics and Accord.Math.Optimization and there are so much private properties that (imho) sould not be.
Examples:
There are more examples, but this are the last I used and came to my mind.
Is this intended? and if so, why?
Making all the relevant, non-implementation-breaking stuff public, or in the case of the statistical distributions at least exposing a getter would be great.
The text was updated successfully, but these errors were encountered: