Boost logo

Boost :

From: Ben Bear (benbearchen_at_[hidden])
Date: 2007-12-26 08:00:31


Herve: I has implemented the repetition combination by count in
gacap-0.0.9.1, except the name is next(prev)_repeat_combination, a
little difference. It's your interface, single function and without
state.

I put it in vault/Algorithms/gacap-0.0.9.1.zip. The code is written
in gacap-0.0.9.1/repeat_combination.hpp, and example can be found in
gacap-0.0.9.1/example/exam_hbr.cpp.

Well, I also copied the mainly code to vault/Algorithms/combi_count.hpp.

The declaration is like this:

template <typename BiIter>
bool
next_repeat_combination(BiIter first, BiIter last);

I like the actual combinations are lexicographical order, so it's the
same as other functions. And, shall we provide a transform function?

template <typename ForwardIter, typename CountIter, typename T>
void transform (CountIter first, CountIter last, ForwardIter value, T
first_value);

template <typename ForwardIter, typename CountIter, typename T,
               typename Incrementor>
void transform (CountIter first, CountIter last, ForwardIter value, T
first_value,
                      Incrementor increase);

As the times you shown, it seems like that no letter lost... :-)

2007/12/26, Hervé Brönnimann <hervebronnimann_at_[hidden]>:
> Hi Ben, and Merry Xmas to you too, slightly belatedly (although in my
> time zone it was still Xmas an hour ago :)
>
> Ben, I don't know if your emails are lost, I can see as part of this
> thread the last messages are dated Dec 24 (11:24am, 10:27am), Dec 23
> (8:38pm), Dec 8 (11:19am), Dec 7 (10:17pm, 11:31:am, 5:17am). I
> haven't responded as fast as usual(?) because of the holidays.
>
> I've looked at the test code you wrote, not for very long I'm
> afraid. I'm glad if we both find no errors in the code.
>
> Regarding the ordering of the sequences for combination counts, your
> note was very interesting. I don't know which one is more valuable,
> the (ordered) sequence of combination counts, or the sequence of
> counts such that the actual combinations are in lexicographical
> order. Let's make a decision, soon. One important factor (for me):
> Is there an implementation of your algorithm (sequence of counts such
> that the actual combinations are in lexicographical order) as a free
> function, without state? I.e., with the interface that I give in the
> proposal?
>
> Cheers,
> --
> Hervé Brönnimann
> hervebronnimann_at_[hidden]
>
>
> On Dec 24, 2007, at 11:23 AM, Ben Bear wrote:
> > Herve, my test is put in vault/Algorithms/combination_test_btb.cpp.
> > And another address:
> > http://www.bxmy.org/combi/combinatin_test_btb.cpp
> >
> > I wonder if some of email I sent are lost...
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk