Talk:Averages/Simple moving average: Difference between revisions

(→‎Lua problem: Not quite resolved...)
Line 17:
:Fixed, my good man. Task description could be clearer, I guess.
Thanks for looking in on this problem. Looking at the update, the routine seems to have a fixed period of 10. The idea is to '''call a routine, that would produce your routine''', in effect. I.e. I call a routine and say I want it to produce an SMA with period 10 and it returns a routine that will compute a simple moving average with period 10; I call a routine and give it a period of 22, and it produces a routine that I can use independently to generate a simple moving average of period 22. It is the action of I() the initialiser in the updated task description. I explained the action of the initialiser without writing pseudo-code as the initialiser would be different for an OO, class based implementation, and a procedural implementation for example. --[[User:Paddy3118|Paddy3118]] 03:50, 7 February 2010 (UTC)
 
==PL/I and problem description==
:''"Then the description of the problem is incorrect. The description says that it can be implemented with an initializer, but there is no requirement that it must be. Naturally, the period P is fixed. That is a requirement in order to be an SMA of the last P items."''
(The comment above was moved from the page).
 
I think a reading of the full task description, and maybe a glance at other solutions should give an idea of what is expected but I will look again at the task description to see what can be done to aid you. --[[User:Paddy3118|Paddy3118]] 04:01, 26 March 2010 (UTC)
Anonymous user