-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18093/#review34507
-----------------------------------------------------------

Ship it!


Looks great, I'm wondering if we should provide 'IntervalSet' as more of a 
Set-like abstraction (in terms of default foreach() behavior).


3rdparty/libprocess/3rdparty/stout/include/stout/interval.hpp
<https://reviews.apache.org/r/18093/#comment64604>

    What about just using an 'else' here and in closed?



3rdparty/libprocess/3rdparty/stout/include/stout/interval.hpp
<https://reviews.apache.org/r/18093/#comment64605>

    non-const for copying, or?



3rdparty/libprocess/3rdparty/stout/include/stout/interval.hpp
<https://reviews.apache.org/r/18093/#comment64608>

    I'm wondering about the use-cases here to see if the current iterator 
semantics are the easiest to work with.
    
    Do you see most people using this as a plain 'set' (with a compact 
representation) or mostly as a 'set of intervals', or both?
    
    For the first use case, I can imagine calling this 'IntervalSet', but 
exposing the same 'Set' like interface as, say, hashset.
    
    For the second use case, I can imagine calling this 'Intervals', and 
exposing the current interface.
    
    For example, what should the default iterator behavior be?
    
    // Case 1:
    foreach (const T& t, set) {
       ...
    }
    
    // Case 2:
    foreach (const Interval& i, intervals) {
      ...
    }
    
    Just something to think about. It seems like you will be using this mostly 
as a 'Set'.



3rdparty/libprocess/3rdparty/stout/include/stout/interval.hpp
<https://reviews.apache.org/r/18093/#comment64611>

    Interesting that they provided both + and |, are they not the same 
operation? (In set.hpp, we provided | & as the set operators, and + for 
inserting single elements).


- Ben Mahler


On Feb. 14, 2014, 5:38 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18093/
> -----------------------------------------------------------
> 
> (Updated Feb. 14, 2014, 5:38 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
> 
> 
> Bugs: MESOS-993
>     https://issues.apache.org/jira/browse/MESOS-993
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 51b118c 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 5d5a760 
>   3rdparty/libprocess/3rdparty/stout/include/stout/interval.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/interval_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/18093/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> repeat 1000 times for the IntervalTest
> 
> 
> Thanks,
> 
> Jie Yu
> 
>

Reply via email to