Closed ghost closed 11 years ago
I would say that having a separate function for a separate message type is the way to go. I was planning to remove gaussMessage()
now for every message there is a special method to create it. they all should be in +ffg/+messages
.
called as follows: ffg.messages.gaussVariance([0 1], [1 0; 0 1])
Do you agree with the folowing?
As a user, I look at the +ffg folder to get an overview of my interface (API) to this toolbox. I then find gaussMessage(), gaussVarianceMessage() and gaussPrecisionMessage() a bit too cloudy and it bodes for more functions as we extend the toolbox.
How about this:
Replace those 3 functions by a function
setMessage()
, as follows:This would provide a single interface to setting messages; the interface is easily readable and extensible. If necessary, the functions gaussMessage(), gaussVarianceMessage() and gaussPrecisionMessage() could be subfunctions in
setMessage()
If you agree, please implement