Boost logo

Boost Users :

Subject: Re: [Boost-users] pair of values as range?
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-07-01 15:27:25


I looked at that, and the interval "hull" is a union. But the library in general is not a good fit.

From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Neil Groves
Sent: Thursday, July 01, 2010 11:57 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] pair of values as range?


On Thu, Jul 1, 2010 at 5:41 PM, John Dlugosz <JDlugosz_at_[hidden]<mailto:JDlugosz_at_[hidden]>> wrote:
Given a std::pair of numbers (not iterators) or other values that have suitable comparison functions and the pair is the low,high of a range, is there already a library somewhere that does utilities such as range union, intersection, intersect testing, etc.?
Have you considered using Boost.Interval http://www.boost.org/doc/libs/1_43_0/libs/numeric/interval/doc/interval.htm? This wouldn't provide the solution for operating upon std::pair directly IIRC but seems to be a good solution from the brief description of the problem.
 --John
Regards,
Neil Groves

TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.



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