feat: add tree-finder
This commit is contained in:
parent
1ab711f81c
commit
bdc720694f
5 changed files with 123 additions and 6 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "linear_finder.h"
|
||||
#include "parallel_finder.h"
|
||||
#include "timer.h"
|
||||
#include "tree_finder.h"
|
||||
#include "word_list_generator.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -26,6 +27,7 @@ MainWindow::~MainWindow() { delete ui; }
|
|||
void MainWindow::setupAlgorithmSelector() {
|
||||
search_algorithms_.appendRow(new QStandardItem("Linear search"));
|
||||
search_algorithms_.appendRow(new QStandardItem("Parallel search"));
|
||||
search_algorithms_.appendRow(new QStandardItem("Tree search"));
|
||||
}
|
||||
|
||||
void MainWindow::generateWordList() {
|
||||
|
@ -68,6 +70,8 @@ std::unique_ptr<Finder> MainWindow::createSelectedFinder() const {
|
|||
case 1:
|
||||
return std::make_unique<ParallelFinder>(
|
||||
word_list_, std::thread::hardware_concurrency());
|
||||
case 2:
|
||||
return std::make_unique<TreeFinder>(word_list_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue