Opened 14 years ago

Closed 13 years ago

#128 closed request (fixed)

Averagers should have interface against iterators

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

Description (last modified by Peter)

I suggest we remove interface against all containers and only have doubles and ranges.

Change History (5)

comment:1 Changed 13 years ago by Peter

Description: modified (diff)
Milestone: later0.4
Priority: trivialmajor
Summary: AveragerWeighted add with DataLookupWeighted1DAveragers should have interface against iterators
Version: trunk

We now have iterators and should use them.

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

We have decided:

  • Averager classes should support iterators and not containers.
  • The add functions should be members.

comment:3 Changed 13 years ago by Peter

I found an annoying thing:

If we make add a range function a member function it will look something like

template<typename T>
add(T first, T last);

and also we have the normal add function

add(double, u_int n=1);

These are kind of in conflict beacause if you write add(3,5) compiler will choose template function and it wont compile because u_int has no operator*.

Therefore I think we keep add range functions as free functions.

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

Yes, but add(3.0,5) would work.

comment:5 Changed 13 years ago by Peter

Resolution: fixed
Status: newclosed

in [1043]

Note: See TracTickets for help on using tickets.