Skip to content

Commit

Permalink
[issue1082] style.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDold committed Feb 9, 2024
1 parent 67ac356 commit 720f058
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ AdditiveCartesianHeuristic::AdditiveCartesianHeuristic(
const std::string &description, utils::Verbosity verbosity)
: Heuristic(transform, cache_estimates, description, verbosity),
heuristic_functions(generate_heuristic_functions(
subtasks, max_states, max_transitions, max_time, pick,
use_general_costs, random_seed, transform, log)) {
subtasks, max_states, max_transitions, max_time, pick,
use_general_costs, random_seed, transform, log)) {
}

int AdditiveCartesianHeuristic::compute_heuristic(const State &ancestor_state) {
Expand Down
2 changes: 1 addition & 1 deletion src/search/heuristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ class Heuristic : public Evaluator {
extern void add_heuristic_options_to_feature(
plugins::Feature &feature, const std::string &description);
extern std::tuple<std::shared_ptr<AbstractTask>, bool, std::string, utils::Verbosity>
get_heuristic_arguments_from_options(const plugins::Options &opts);
get_heuristic_arguments_from_options(const plugins::Options &opts);
#endif
4 changes: 2 additions & 2 deletions src/search/operator_counting/delete_relaxation_constraints.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ class DeleteRelaxationConstraintsFeature : public plugins::TypedFeature<Constrai
virtual shared_ptr<DeleteRelaxationConstraints> create_component(
const plugins::Options &options, const utils::Context &) const override {
return make_shared<DeleteRelaxationConstraints>(
options.get<bool>("use_time_vars"),
options.get<bool>("use_integer_vars"));
options.get<bool>("use_time_vars"),
options.get<bool>("use_integer_vars"));
}
};

Expand Down
8 changes: 4 additions & 4 deletions src/search/pruning/limited_pruning.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ using namespace std;

namespace limited_pruning {
LimitedPruning::LimitedPruning(
const shared_ptr<PruningMethod> &pruning,
double min_required_pruning_ratio,
int expansions_before_checking_pruning_ratio,
utils::Verbosity verbosity)
const shared_ptr<PruningMethod> &pruning,
double min_required_pruning_ratio,
int expansions_before_checking_pruning_ratio,
utils::Verbosity verbosity)
: PruningMethod(verbosity),
pruning_method(pruning),
min_required_pruning_ratio(min_required_pruning_ratio),
Expand Down
2 changes: 1 addition & 1 deletion src/search/pruning/stubborn_sets_atom_centric.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class StubbornSetsAtomCentric : public stubborn_sets::StubbornSets {
virtual void compute_stubborn_set(const State &state) override;
public:
explicit StubbornSetsAtomCentric(bool use_sibling_shortcut,
AtomSelectionStrategy atom_selection_strategy, utils::Verbosity verbosity);
AtomSelectionStrategy atom_selection_strategy, utils::Verbosity verbosity);
virtual void initialize(const std::shared_ptr<AbstractTask> &task) override;
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/search/utils/tuples.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
#include <tuple>

namespace utils {
template<class ...Ts, std::size_t...Is>
template<class ... Ts, std::size_t... Is>
auto flatten_tuple_elements(std::tuple<Ts...> &&t, std::index_sequence<Is...>);

template<class T>
auto flatten_tuple(T &&t) {
return std::make_tuple(std::move(t));
}

template<class ...Ts>
template<class ... Ts>
auto flatten_tuple(std::tuple<Ts...> &&t) {
constexpr auto tuple_size = std::tuple_size<std::tuple<Ts...>>::value;
return flatten_tuple_elements(std::move(t), std::make_index_sequence<tuple_size>());
}

template<class ...Ts, std::size_t...Is>
template<class ... Ts, std::size_t... Is>
auto flatten_tuple_elements(std::tuple<Ts...> &&t, std::index_sequence<Is...>) {
return std::tuple_cat(flatten_tuple(std::get<Is>(std::move(t)))...);
}
Expand Down

0 comments on commit 720f058

Please sign in to comment.