Opened 12 years ago
Closed 11 years ago
#8644 closed enhancement (fixed)
dojox.math could use a sum function
Reported by: | foobarfighter | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dojox | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Submitting a patch for a dojox.math.sum function.
Attachments (2)
Change History (9)
Changed 12 years ago by
Changed 12 years ago by
Attachment: | patch2.txt added |
---|
comment:2 Changed 12 years ago by
Owner: | changed from Adam Peller to Tom Trenka |
---|
dojox.lang.functional.reduce does this. Do we need a shortcut?
comment:3 Changed 12 years ago by
ttrenka, it wouldn't have been obvious for me to use that function (especially since it's in another package where I wouldn't have looked) so I don't think it's a bad idea. I was also considering submitting a patch for dojox.math.avg, but my guess is that there might be something in dojox.math or dojox.lang for this as well.
What are your thoughts? I don't mind submitting the patch.
comment:4 Changed 12 years ago by
foobarfighter, I think you're right. While reduce can do this, it's not an obvious solution at all.
Some time ago we had a GSoC project that was supposed to be bringing statistical analysis functions to dojox.math but that sort of got canned; I think a list of simple functions such as sum, average, mean etc. would not be a bad idea to include directly with dojox.math (maybe dojox.math.stats or something).
If you'd like to work on this and submit a patch, I'll review and push as needed.
comment:5 Changed 12 years ago by
Don't get me started on statistics and its current state in the JavaScript community. I cannot look without pity at all attempts to benchmark things, when people got some senseless numbers to begin with, and cannot even interpret them correctly.
We have to have a stat package. And I am not talking about something fancy, just some basic 101 functionality: average, median, percentiles, deviations, curves, the simplest 5 number summary for goodness sake.
And we have to have a benchmarking facility on par with DOH. With proper charts.
comment:6 Changed 12 years ago by
Milestone: | tbd → 1.4 |
---|
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was added with the new dojox.math.stats package.
Patch for adding sum