AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
potential_function.h
1#ifndef POTENTIALS_POTENTIAL_FUNCTION_H
2#define POTENTIALS_POTENTIAL_FUNCTION_H
3
4#include <vector>
5
6class State;
7
8namespace potentials {
9/*
10 A potential function calculates the sum of potentials in a given state.
11
12 We decouple potential functions from potential heuristics to avoid the
13 overhead that is induced by evaluating heuristics whenever possible.
14*/
15class PotentialFunction {
16 const std::vector<std::vector<double>> fact_potentials;
17
18public:
19 explicit PotentialFunction(
20 const std::vector<std::vector<double>> &fact_potentials);
21 ~PotentialFunction() = default;
22
23 int get_value(const State &state) const;
24};
25}
26
27#endif