http://www.perlmonks.org?node_id=614297


in reply to multi-dimensional range lookup

Err... are the /combinations/ of colors important? If I'm reading the suggestions correctly, I could make an image with 768 colors (all 256 pure red values, all 256 pure green values, all 256 pure blue values), and they would always match any query -- but what if you want to match an RGB value of (127,127,127)?

My image would not contain that value, but the suggestions I'm seeing would match it.

Now if you kept 16 million indices, with one bit for each image in your data set, you could use the suggested method. A set of 1000 images would take 2 billion bytes, which might be more than you want to allocate.

Or am I making the problem too difficult? edit: note that 16 million is 2^24