14 template<
typename Element>
25 sizes_(sizes.
clone()),
26 elements_(elements.
clone()) {};
34 sizes_(vectors.sizes_->
clone()),
35 elements_(vectors.elements_->
clone()) {};
41 size_t size = (*sizes_)();
42 std::vector<Element> result(size);
44 auto elements_producer = [&]() -> Element {
45 return (*elements_)();
47 std::generate_n(result.begin(),
54 std::unique_ptr<SizesStrategy> sizes_;
55 std::unique_ptr<ElementsStrategy> elements_;
Vectors(const Vectors< Element > &vectors)
Definition: vectors.h:33
std::vector< Element > operator()() const override
Definition: vectors.h:40
std::unique_ptr< Strategy< std::vector< Element > > > clone() const override
Definition: bases.h:99
Vectors(const SizesStrategy &sizes, const ElementsStrategy &elements)
Definition: vectors.h:23