the difference in size between largest and smallest
subsets. I haven't tried to express this as a GA problem, certainly not in J,
but it seems doable.
Jon
On Fri, 5/20/16, Devon McCormick wrote:
Subject: [Jprogramming] Even partitions
To:
x ([* >:@i.@+:@>.@%~) {:b
p=:x
d=:}.(4 :('s=:s+x';'if. p -Original Message-
> From: Programming [mailto:programming-boun...@forums.jsoftware.com]
> On Behalf Of Devon McCormick
> Sent: zaterdag 21 mei 2016 4:35
> To: J-programming forum
> Subject: Re: [Jprogrammin
ay, May 20, 2016 10:35 PM
Subject: Re: [Jprogramming] Even partitions
I don't care about the number of files, only the total size per partition.
What Pascal suggested was my initial idea - it's probably good enough.
Another ideas is to generate a lot of random partitions and pick the best
repeatedly take a large file out of a too big group, and place it into
> a
> > > too small group. The average/target group size is quickly calculated.
> > >
> > > Also take a small file out of a too long group, and place it into a too
> > > short group.
>
> > - Original Message -
> > From: Devon McCormick
> > To: J-programming forum
> > Sent: Friday, May 20, 2016 1:37 PM
> > Subject: Re: [Jprogramming] Even partitions
> >
> > It's an arbitrary grouping so that the sum of file sizes in each group
> short group.
>
>
>
>
> - Original Message -
> From: Devon McCormick
> To: J-programming forum
> Sent: Friday, May 20, 2016 1:37 PM
> Subject: Re: [Jprogramming] Even partitions
>
> It's an arbitrary grouping so that the sum of file sizes in each grou
file out of a too long group, and place it into a too short
group.
- Original Message -
From: Devon McCormick
To: J-programming forum
Sent: Friday, May 20, 2016 1:37 PM
Subject: Re: [Jprogramming] Even partitions
It's an arbitrary grouping so that the sum of file sizes in each
That is a different problem from what I was suggesting to solve with q:
I'll note, also, that you have left undefined what "small number of
groups" means, and how tolerant you are on "as equally sized as
possible".
That said, let's say you wanted to split them into four groups. A
reasonable firs
It's an arbitrary grouping so that the sum of file sizes in each group is
nearly equal between groups. To roughly approximate a distribution, you
could use something like this:
szs=. (+/16 4000?@$400) + (+/8 4000?@$2e3) + (+/4 4000?@$5e5) + 4000?@$1e6
On May 20, 2016 10:48 AM, "David Porter" wro
Maybe use something like (,.q:&.>+&(i:5) photocount) to get an idea
of what some plausible options are?
--
Raul
On Fri, May 20, 2016 at 10:11 AM, Devon McCormick wrote:
> I have a few thousand photos I want to put into a small number of groups as
> equally-sized as possible. It looks like a k
Groups based on what?
Dave
On 5/20/2016 10:11 AM, Devon McCormick wrote:
I have a few thousand photos I want to put into a small number of groups as
equally-sized as possible. It looks like a knapsack problem but I only
need to get within some tolerant equality.
Has anyone done something like
I have a few thousand photos I want to put into a small number of groups as
equally-sized as possible. It looks like a knapsack problem but I only
need to get within some tolerant equality.
Has anyone done something like this?
Thanks,
Devon
--
12 matches
Mail list logo