View Single Post
Old 10-11-2012, 08:21 PM   PM User | #8
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,247
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Okay, let's do this one more time:

Say you searched for 250 x 190 x 80

And say these are your choices:
250 1 1
250 500 1
250 1 500
250 190 1
250 190 500
240 180 70

*CLEARLY* the first 3 choices are useless. Yet each has a perfect match on length.

Equally clearly the next 2 choices are useless, even though each has a perfect match on both length an height.

So the only reasonable choice is the last one, even though none of its dimensions is a perfect match.

You see my point? THERE IS NO POINT in looking for a perfect match as a separate operation. What you really want is, as I suggested, the CLOSEST match on all 3 dimensions. But, again, you have to tell us what CLOSEST then means.

Is it the sum of the differences being closest to zero? The product of the differences being closest to zero? What?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote