[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: suggestion for Averager
From: |
Ken Cline |
Subject: |
Re: suggestion for Averager |
Date: |
Wed, 7 Jul 1999 17:09:06 -0400 (EDT) |
On Wed, 7 Jul 1999, Marcus G. Daniels wrote:
> >>>>> "RLR" == Rick Riolo <address@hidden> writes:
>
> RLR> (or is there a way to do this with existing tools?)
>
> Not unless you pre-filter (and thus fix) the feed collection.
> Otherwise, there isn't; the denominator is always incremented.
>
> Two solutions occur to me:
>
> 1) Have Averager & Entropy accept two kinds of methods. The first
> form would be a method of N arguments that returns a double. The
> second form would be as a method of N + 1 arguments returning a
> boolean where the extra argument is a pointer to the returned
> double.
>
> + fast (no extra method invocations)
> * "-(BOOL)value: (double *)val index: i" methods would be needed
> to select among variables.
>
> 2) Modify MessageProbe so that the called selector could be switched.
> Averager, being a MessageProbe, could then internally temporarily
> switch to the selection probe and back within the same computation.
>
> + no method calling convention to know about
> - slower, a selection method must be called and then a query method
>
How about a dynamically filtered collection? You could
create the "FilteredCollection" with an existing collection
and a selector (e.g. M(isGreen)) and the resulting wrapper
object would skip over members of the internal collection.
That probably means you'd need a "FilteredIndex" to
complement the collection object.
Hmmm... It looks like the other solutions would definitely
be easier to implement.
_________________________________________________________
Ken Cline address@hidden
SAIC VOICE (410) 571-0413
Annapolis, MD FAX (301) 261-8427
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.