Questions tagged [boost-icl]

Boost.Icl (Interval Container Library) is a C++ library providing interval sets and maps and aggregation of associated values.

Boost.Icl (Interval Container Library) is a C++ library providing interval sets and maps and aggregation of associated values.

32 questions
1
vote
1 answer

How can I allow statically bounded, continuous singleton intervals in boost::icl containers

I use boost ICL to model a mapping of time to states and event, where I model time as double. Some events are momentary, i.e. they do not occur over an interval of time, but rather at a single point of time, which I can model conceptually as a…
MonkeyKhan
  • 35
  • 3
1
vote
1 answer

How to get values from interval_maps for given key?

I'm using boost::icl::interval_maps with int intervals and I was wondering how can I get the values for int (key) that belongs to some interval? For example if we have a interval map that has the following structure [0, 5): ["A1", "A2"], [5, 10):…
Daniel
  • 980
  • 9
  • 20
1
vote
1 answer

boost::icl::interval and boost::numeric::interval is there an adaption layer available?

I've been using boost::numeric::interval everywhere in my code. Now I've started using the boost interval container library. Does there exist an adaption header so I can put boost::numeric::interval intervals into boost::icl containers? I've tried…
bradgonesurfing
  • 30,949
  • 17
  • 114
  • 217
1
vote
0 answers

Can boost interval_set or interval_map create clusters with cluster membership counts?

For example if I have 5 input intervals [0,2] [1,3] [2,4] [5,7] [6,8] the result should indicate two clusters. Cluster 1 [0,4] with a count of 3 [5,8] with a count of 2 But I've found that boost::icl::interval map doesn't aggregate clusters, but…
bradgonesurfing
  • 30,949
  • 17
  • 114
  • 217
1
vote
1 answer

Selection in the codomain of interval_map

In my current project processes, distinguishable intervals, needs to be combined, if they are adjacent. For this purpose I wanted to use the fantastic boost::icl library. Every process can be uniquely identified by its id. First I'm adding some…
Aleph0
  • 5,816
  • 4
  • 29
  • 80
1
vote
1 answer

Boost `interval_map` - how to customize aggregating on touch

The Boost ICL interval_set can join right-open intervals, which touch each other, during adding them to the set. For example, intervals [0,4) and [4,8) will be joined to become an interval [0,8). This is more complicated for the interval_map -…
HEKTO
  • 3,876
  • 2
  • 24
  • 45
1
vote
1 answer

Passing boost discrete_interval as this argument discards qualifiers [-fpermissive]

In the following code: #include #include #include #include typedef icl::discrete_interval Interval; typedef icl::interval_set IntervalSet; int main(int…
Roman Rdgz
  • 12,836
  • 41
  • 131
  • 207
1
vote
1 answer

Which boost library should i use to add the intervals as mentioned in the description?

I am working on intervals in a c++ program. I want something like below: I want to add intervals iteratively in a for loop. Assume my first interval is (0, 5). I want to add an interval (3,6) such that the resulting interval set should be (0,3),…
spnsp
  • 163
  • 1
  • 8
1
vote
0 answers

boost::icl::contains unable to check for subset

boost::icl::interval_map>> larger, smaller; larger.add(make_pair(boost::icl::discrete_interval::closed(102,104), boost::icl::interval_map
na_ka_na
  • 1,558
  • 1
  • 12
  • 15
1
vote
1 answer

boost interval_map vs split_interval_map

I'm having difficulty understanding interval_map & split_interval_map, I implemented both & result is same. Below is the code for split interval map. #include #include #include…
Asna
  • 108
  • 8
1
vote
1 answer

C++ arithmetic on time intervals

I already have working (ugly) code for this, but I will ask anyway: I have the time intervals [09:15, 10:00), [21:10, 21:45) during weekdays. Given time t and a number of seconds s, if t is within the intervals, I have to calculate the date and time…
nurettin
  • 11,090
  • 5
  • 65
  • 85
1
vote
1 answer

Compiler errors when trying to overload operator+= for an enum

I'm having some problems trying to overload the += operator for an enum I've defined within a namespace. I shouldn't need to actually use the operator, however, a library I'm using (boost::icl) requires that the += operator is defined for the data…
DickNixon
  • 151
  • 2
  • 7
1
vote
1 answer

boost icl interval_map interval_set templates

I've started work with boost:icl library which is really comprehensive and convenient. I'm using mostly two types of intervals from boost, boost::icl::interval_set and boost::icl::interval_map. Some times I have to manipulate with just interval…
Andrey Kartashov
  • 1,368
  • 1
  • 12
  • 20
1
vote
1 answer

Boost ICL not working as expected, std::set operator+= expected

I'm trying to use Boost (1.51) ICL to simplify some interval searches. Types: SequenceI::shp_set is a std::set of shared pointers types::mz_t is a Boost::Units quantity interval_map is the typedef for the interval…
notwithoutend
  • 235
  • 1
  • 9
0
votes
1 answer

Is it possible to store a list of values in boost interval_map?

I have code like: int c1 = 1; set s1; s1.insert(c1); // Add a number to a set interval_map< date, set > cmap; // Declare an interval_map discrete_interval range1 = discrete_interval::closed(from_string("2012-01-01"),…
user1259642
  • 671
  • 1
  • 7
  • 5