Opened 15 years ago
Closed 15 years ago
#361 closed enhancement (fixed)
Averager class does not support removal of data
Reported by: | Jari Häkkinen | Owned by: | Jari Häkkinen |
---|---|---|---|
Priority: | major | Milestone: | yat 0.5 |
Component: | statistics | Version: | trunk |
Keywords: | Cc: |
Description
The 'weight' for Averager::add is an unsigned long and there is no remove function. Either we need to change unsigned long to signed long or add a remove function.
Change History (11)
comment:1 Changed 15 years ago by
Status: | new → assigned |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
I have already fixed Averager (needed it urgently). I'll check in Averager and work on AveragerPair.
comment:4 Changed 15 years ago by
changeset:1290: Averager accepts negative n for removal of data from the Averager.
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
changeset:1291: AveragerPair accepts negative n for removal of data.
comment:6 Changed 15 years ago by
Milestone: | yat 0.4.1 → yat 0.5 |
---|---|
Priority: | critical → major |
Resolution: | fixed |
Status: | closed → reopened |
Version: | 0.4 → trunk |
This change breaks rules for interface changes in a stable branch, moved to next minor release.
comment:7 Changed 15 years ago by
changeset:1294 reverts 0.4-stable to state before changes related to this ticket.
comment:8 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
changest:1295 resolves this ticket.
comment:9 follow-up: 10 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
./averager_test -v
results in
testing Averager lt-averager_test: Averager.cc:54: void theplu::yat::statistics::Averager::add(double, long int): Assertion `n>-1' failed. Aborted
comment:10 Changed 15 years ago by
Replying to peter:
./averager_test -v
results intesting Averager lt-averager_test: Averager.cc:54: void theplu::yat::statistics::Averager::add(double, long int): Assertion `n>-1' failed. Aborted
I cannot reproduce this error. 'make check' works fine and so do './averager_test -v'. I am on a MacOSX Leopard with Intel processors ... reading the code I realize that the assert should react ... there is a test for n==-2 that is supposed to return true! Ah, I have no debug options to my compiler. Sorry about that, I'll rewrite the test.
comment:11 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
changeset:1297 resolves the assert() issue.
Ok, I think changing unsigned long to long is preferable. I think we can keep the member variable
n_
unsigned.We should also change AveragerPair? so it have the same interface.