15 template<
typename Element>
26 sizes_(sizes.
clone()),
27 elements_(elements.
clone()) {};
35 sizes_(sets.sizes_->
clone()),
36 elements_(sets.elements_->
clone()) {};
42 size_t size = (*sizes_)();
43 std::set<Element> result;
45 [&result](Element value) ->
bool {
46 return result.find(value) == result.end();
49 std::generate_n(std::inserter(result,
57 std::unique_ptr<SizesStrategy> sizes_;
58 std::unique_ptr<ElementsStrategy> elements_;
Sets(const Sets< Element > &sets)
Definition: sets.h:34
std::function< bool(Product)> Requirement
Definition: sieve.h:12
std::set< Element > operator()() const override
Definition: sets.h:41
std::unique_ptr< Strategy< std::set< Element > > > clone() const override
Definition: bases.h:99
Filtered< Value > filter(const Requirement< Value > &requirement) const override
Definition: bases.h:189
Sets(const SizesStrategy &sizes, const ElementsStrategy &elements)
Definition: sets.h:24