// (C) Copyright 2008-2009 SDML (www.sdml.info) // // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Copyright Andrew Sutton 2007 // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_SETS_HPP #define BOOST_SETS_HPP // The generic set interface is designed to provide a functional interface // to set like objects. Unlike the STL set algorithms, this operates on sets as // whole objects rather than iterator ranges. // Note that this interface imposes several requirements on sets. Specifically, // they must provide a value type that represents objects that are actually // in the set, and that they provide a forward iterator that iterates over // only those objects actually contained within the set. // // In order to get generic access to iterators of set implementations, use the // generic range library (Boost.Range) to provide functional equivalents of the // begin() and end() methods. // The set interface defines the following functions that must be implemented // by the actual set types in use. // bool empty(const Set& s); // void intersection(const Set& s, const Set& t, Set& result) // Compute the intersection of s and t and store it in the result. // Set intersection(const Set& s, const Set& t) // Return the intersection of s and t. // void intersection_inplace(Set& s, const Set& t) // Remove elements of s that are not in both s and t. // Automatically import two implementations of the set interface. Also include // the algorithms header for generic set operations. #include #include #include #endif