1#ifndef EVALUATION_CONTEXT_H
2#define EVALUATION_CONTEXT_H
4#include "downward/evaluation_result.h"
5#include "downward/evaluator_cache.h"
6#include "downward/operator_id.h"
7#include "downward/task_proxy.h"
9#include <unordered_map>
12class SearchStatistics;
43class EvaluationContext {
48 SearchStatistics* statistics;
49 bool calculate_preferred;
51 static const int INVALID = -1;
54 const EvaluatorCache& cache,
58 SearchStatistics* statistics,
59 bool calculate_preferred);
69 const EvaluationContext& other,
72 SearchStatistics* statistics,
73 bool calculate_preferred =
false);
82 SearchStatistics* statistics,
83 bool calculate_preferred =
false);
98 SearchStatistics* statistics =
nullptr,
99 bool calculate_preferred =
false);
101 const EvaluationResult& get_result(Evaluator* eval);
102 const EvaluatorCache& get_cache()
const;
103 const State& get_state()
const;
104 int get_g_value()
const;
105 bool is_preferred()
const;
118 bool is_evaluator_value_infinite(Evaluator* eval);
119 int get_evaluator_value(Evaluator* eval);
120 int get_evaluator_value_or_infinity(Evaluator* eval);
121 const std::vector<OperatorID>& get_preferred_operators(Evaluator* eval);
122 bool get_calculate_preferred()
const;