[rules-users] sliding window combination ?

Wolfgang Laun wolfgang.laun at gmail.com
Thu Jul 7 10:33:15 EDT 2011


On 7 July 2011 16:20, Andre <morpheusandre at web.de> wrote:

> thx for your help..
> so i have to implement an accumulate function which counts based on
> matching
> ids, the reference will be set in the init method and the accumulate
> methods
> then checks whether its the same or not , ok
>
>
The init method should just do
  Map<ID,Integer> id2count = new ...
or equivalent. The result - a Collection - could be the Entry Set of the
map.


> what is this "reverse" method for ? (when does drools has to reverse this ?
> , do i have to reverse the count or also the check ?)
>

It's called for a matching element being retracted. If you count, it'll
subtract one.

If you need to know, and react to, all individual excess occurrences, the
collection of counters should be analyzed after the accumulate.

-W


>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148339.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110707/50da8fc0/attachment.html 


More information about the rules-users mailing list