An interesting problem

McGlinchy, Alistair Alistair.McGlinchy at marks-and-spencer.com
Wed Jan 3 20:40:58 GMT 2007


> On 3 Jan 2007, at 20:10, McGlinchy, Alistair wrote:
> > That's sort of what I have been playing with, but it still doesn't
> > seem
> > impressively fast. There's a large number of off-by-one errors  
> > possible
> > in here, but the answers seems to tally up when I check in Excel.
> 
> Another thing you can do is have the quadtree (or whatever structure  
> you build) record the minima and maxima for each region. That'll  
> might allow you to discount some regions (too negative) without  
> having to sum them.

May need a but more clarification here. How would this work for the
following example. Consider a large matrix of -1 and +1 values with this
sub matrix in the middle

-1000  -1000  -1000  
-1000  +6000  -1000  
-1000  -1000  -1000  

That's -2000 as a 3x3 array. But you don't want to discount it as the
+6000 will likely be the best range alone.

Cheers,

Alistair


**********************************************************************
Registered Office:
Marks and Spencer plc
Waterside House
35 North Wharf Road
London
W2 1NW

Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422
Facsimile (020) 7487 2670

<<www.marksandspencer.com>>

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful.
2005





More information about the london.pm mailing list