On 5/21/06, Brannon King <[EMAIL PROTECTED]> wrote:
Jay Sprenkle wrote:
>> score(x,y) = max(score(x+n,y+n)-n*penalty) where n < drc(x+n,y+n) < 256
>
> So at some 'sample' you have the score and drc, but not the x,y value?
> The x,y values can be interpolated using some algebra and the surrounding
> samples?
Uh, no. Sorry my other emails were unclear. At all values that I do
have, I have an x,y,score, and drc. I can calculate any value that is
missing, though. The n in the above formula refers to all numbers
between 0 and 256. I'm taking the max over all the data I have in that
range: max for all data pieces that fall within n distance of the piece
I'm calculating.

If I understand it right you'll definitely need a correlated subquery.
You need one query to calculate the max() of the 257(0-256?) values.
There must be some way to define which values should be used
in that calculation for a specific piece (the distance). Is the distance
geometric and calculated from x,y?

In pseudo code something like this:

select piece, ( sub query to calculate max where distance from
desired_piece < 256 )
from blah
where piece = desired_piece

Reply via email to