Skip to content

Commit

Permalink
subtypes initialization and additional controls
Browse files Browse the repository at this point in the history
  • Loading branch information
josura committed Aug 10, 2023
1 parent 8c4988e commit 9e07456
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/mainRefactored.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ int main(int argc, char** argv ) {
}

// reading the parameters
std::vector<std::string> subtypes;
if(vm.count("subtypes")){
std::cout << "[LOG] subtypes filename set to "
<< vm["subtypes"].as<std::string>() << ".\n";
subtypesFilename = vm["subtypes"].as<std::string>();
subtypes = getVectorFromFile<std::string>(subtypesFilename);
}else{
std::cout << "[LOG] subtypes filename not set, set to default: all types \n";
subtypesFilename = "";
}

if (vm.count("intertypeIterations")) {
std::cout << "[LOG] iterations intertype set to "
Expand Down Expand Up @@ -375,6 +365,17 @@ int main(int argc, char** argv ) {
std::cerr << "[ERROR] no graph file or folder specified: aborting"<<std::endl;
return 1;
}

std::vector<std::string> subtypes;
if(vm.count("subtypes")){
std::cout << "[LOG] subtypes filename set to "
<< vm["subtypes"].as<std::string>() << ".\n";
subtypesFilename = vm["subtypes"].as<std::string>();
subtypes = getVectorFromFile<std::string>(subtypesFilename);
}else{
std::cout << "[LOG] subtypes filename not set, set to default: all types \n";
subtypes = types;
}

//filter types with the subtypes
std::vector<std::string> typesFiltered = vectorsIntersection(types, subtypes);
Expand Down

0 comments on commit 9e07456

Please sign in to comment.