Boost logo

Boost Users :

Subject: [Boost-users] [multi_index] looking for "equal_to and less than"
From: isjk (isjk_at_[hidden])
Date: 2010-08-02 02:54:05


hi,

I've got a structure like this,
struct peer
{
   int md5_; // unique key.
   int rank_;
   int degrees_;
};

now, I need a composite_key, it can find equal_to "md5" and less than
"rank_" and "degrees_" less than 8.
eg:
md5 rank degrees
2 0 8
2 1 5
2 2 0
2 6 3
4 3 1
4 5 0

f(2, 2) return (2 1 5)
f(2, 1) return null
f(2, 6) return (2 2 0)(2 1 5)
f(4, 5) return (4 3 1)

Thanks.

-- 
View this message in context: http://old.nabble.com/-multi_index--looking-for-%22equal_to-and-less-than%22-tp29322451p29322451.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net