Opened 13 years ago

Closed 13 years ago

#246 closed request (fixed)

Averager classes should have interface for Iterators

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.4
Component: statistics Version: trunk
Keywords: Cc:

Description (last modified by Peter)

needs ticket:244 ticket:247 relates to ticket:245

More or less the same as in ticket:245 but for Averager classes.

Change History (9)

comment:1 Changed 13 years ago by Peter

Status: newassigned

comment:2 Changed 13 years ago by Peter

Description: modified (diff)

In [886] implemented functions for Averager and AveragerPair?. Should do the same for weighted Averager cousins when we have IteratorWeighted? (ticket:247)

What about the add_values function? Should they be reoved or should we keep the for backward.. blah blah?

If we decide to change interface I think we should have a NEWS or ChangeLog where we can list such changes.

comment:3 Changed 13 years ago by Peter

In [887] add function also accepts AveragerWeighted?. Should be specialized on IteratorWeighted?...

comment:4 Changed 13 years ago by Markus Ringnér

In [890] this functionality was implemented for AveragerPairWeighted? in such a way that it will only work for IteratorWeighted?. Now only AveragerWeighted? is remaining (sorry I forgot it since I did not need it for ticket:245).

comment:5 Changed 13 years ago by Peter

In [910] impl add function for AveragerWeighted??. The function distinguishes between normal iterators and weighted iterators, and call the member add function appropriately. refs #246

comment:6 Changed 13 years ago by Peter

In [911]: Made add function for Averager no longer accept weighted iterators. refs #246

comment:7 Changed 13 years ago by Peter

In ([912]): Made add function for AveragerPair no longer accept weighted iterators. refs #246

comment:8 Changed 13 years ago by Peter

Should these functions be member variables instead???

The reason for moving them to be member functions is that the underlying functions that specialize on weighted and unweighted could be hidden as private.

This could of course also be accomplished using friendship.

Opinions?

comment:9 Changed 13 years ago by Peter

Resolution: fixed
Status: assignedclosed

in [914]

For now I leave these as free functions.

Note: See TracTickets for help on using tickets.