Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34061

Re: own stream reduction

Newsgroups comp.lang.java.programmer
Date 2016-04-03 08:32 -0700
References <feb2691d-116f-4519-9c4d-3e01294703aa@googlegroups.com> <ndokfn$7bb$1@dont-email.me> <ndpcgq$rlf$1@news.albasani.net>
Message-ID <7b79b3b5-fa2a-40a2-900b-d0252549d4b6@googlegroups.com> (permalink)
Subject Re: own stream reduction
From Philipp Kraus <philipp.kraus.flashpixx@gmail.com>

Show all headers | View raw


Am Samstag, 2. April 2016 23:11:07 UTC+2 schrieb Sebastian:
> Am 02.04.2016 16:23, schrieb Eric Sosman:
> > On 4/2/2016 10:10 AM, Philipp Kraus wrote:
> >> Hello,
> >>
> >> I try to buld an own reduction stream reduction for my data structure.
> >> [...]
> >> I'm searching for a tutorial or example how I can create an own reduce
> >> operator of my own type.
> >
> >      The Java Tutorial has a page showing how a few simple reduction
> > operations can be built "from the ground up:"
> >
> > http://docs.oracle.com/javase/tutorial/collections/streams/reduction.html
> 
> In particular, as Stream.reduce() is a general-purpose reduction method, 
> you don't need to define your own reduction, you just need an 
> accumulator. The bodies of the for-loops you have shown are suitable as 
> accumulators: They are associative binary operators on Fuzzy<Boolean>.

Thanks a lot, the hint with the "accumulator" was great.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

own stream reduction Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-04-02 07:10 -0700
  Re: own stream reduction Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-04-02 10:23 -0400
    Re: own stream reduction Sebastian <news@seyweiler.dyndns.org> - 2016-04-02 23:10 +0200
      Re: own stream reduction Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-04-03 08:32 -0700

csiph-web