1#ifndef MERGE_AND_SHRINK_MERGE_SCORING_FUNCTION_MIASM_H
2#define MERGE_AND_SHRINK_MERGE_SCORING_FUNCTION_MIASM_H
4#include "downward/merge_and_shrink/merge_scoring_function.h"
6#include "downward/utils/logging.h"
11namespace merge_and_shrink {
13class MergeScoringFunctionMIASM :
public MergeScoringFunction {
14 const bool use_caching;
15 std::shared_ptr<ShrinkStrategy> shrink_strategy;
17 const int max_states_before_merge;
18 const int shrink_threshold_before_merge;
19 utils::LogProxy silent_log;
20 std::vector<std::vector<std::optional<double>>>
21 cached_scores_by_merge_candidate_indices;
23 virtual std::string name()
const override;
25 dump_function_specific_options(utils::LogProxy& log)
const override;
28 MergeScoringFunctionMIASM(
29 std::shared_ptr<ShrinkStrategy> shrink_strategy,
31 int max_states_before_merge,
32 int threshold_before_merge,
34 virtual std::vector<double> compute_scores(
35 const FactoredTransitionSystem& fts,
36 const std::vector<std::pair<int, int>>& merge_candidates)
override;
37 virtual void initialize(
const TaskProxy& task_proxy)
override;
39 virtual bool requires_init_distances()
const override {
return true; }
41 virtual bool requires_goal_distances()
const override {
return true; }