about summary refs log tree commit diff stats
path: root/.gitmodules
blob: f25b54a8383eb7212fb379bd90db1588607a8b9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[submodule "vendor/hkutil"]
	path = vendor/hkutil
	url = https://git.fourisland.com/hkutil
[submodule "vendor/apclientpp"]
	path = vendor/apclientpp
	url = https://github.com/black-sliver/apclientpp.git
[submodule "vendor/valijson"]
	path = vendor/valijson
	url = https://github.com/tristanpenman/valijson.git
[submodule "vendor/wswrap"]
	path = vendor/wswrap
	url = https://github.com/black-sliver/wswrap.git
[submodule "vendor/websocketpp"]
	path = vendor/websocketpp
	url = https://github.com/zaphoyd/websocketpp.git
[submodule "vendor/asio"]
	path = vendor/asio
	url = https://github.com/chriskohlhoff/asio/
[submodule "vendor/vcpkg"]
	path = vendor/vcpkg
	url = https://github.com/Microsoft/vcpkg.git
cpf"><vector> #include "cardset.h" #include "prefix_search.h" struct usage { size_t cardId; size_t strIndex; size_t strLen; usage(size_t ci, size_t si, size_t sl) : cardId(ci), strIndex(si), strLen(sl) {} }; struct solution { const ps_type& prefix; std::vector<size_t> lengths; size_t score; }; class designer { public: designer(std::string text, const ps_type& titles) : text_(std::move(text)), titles_(titles), solutions_(text_.length() + 1) {} std::list<usage> generate(std::mt19937& rng) const; private: const solution& get(size_t i) const; solution calculate(size_t i) const; const std::string text_; const ps_type& titles_; mutable std::vector<std::unique_ptr<solution>> solutions_; }; #endif /* end of include guard: DESIGNER_H_06F8DE64 */