Boost logo

Boost :

From: FlSt_at_[hidden]
Date: 2005-07-26 15:17:46


Hello.

You can find a new version of my class to the sandbox file vault
(flos_junction.zip). It implements some of the ideas from this
discussion. But it's very inefficient, because it makes a lot of copies.
I don't like the implementation, but it works and has the semantic I
visualized. Probaly I will need some help to make it more efficient.
I see junctions as a expressive way to write comparisons and aritmethic
operations on lists and as a alternative to loops.
Furthermore I must note that Perls junctions are not limited to sets.
Junctions are more general. They can be applied to any list and are a
logical linkage between the elements of the list, which determines the
result of a comparison. That's exactly what my class implements. There
are now four classes: conjunction<T>, disjunction<T>, abjunction<T> and
injunction<T>. Whereas T is a Container-Type. And the Functions all_of,
any_of, one_of, none_of create instances of this classes from a
container. See the examples. There is a base class junction, becaus
elsewise I don't know how to support all the operators and circumvent
writing duplicate code (There are already a lot of macros ;-). Is there
a better way?

Sincerly
  Florian


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