1#ifndef PROBFD_PDBS_STATE_RANKING_FUNCTION_H
2#define PROBFD_PDBS_STATE_RANKING_FUNCTION_H
4#include "probfd/pdbs/assignment_enumerator.h"
5#include "probfd/pdbs/types.h"
7#include "downward/task_proxy.h"
26 AssignmentEnumerator enumerator_;
116 std::vector<int>
unrank(StateRank abstract_state)
const;
154 bool next_rank(StateRank& s, std::span<int> mutable_variables)
const;
157class StateRankToString {
158 const VariablesProxy variables_;
162 explicit StateRankToString(
163 VariablesProxy variables,
166 std::string operator()(StateRank state)
const;
Implements the state ranking function for abstract states of projections.
Definition state_ranking_function.h:24
unsigned int num_states() const
Get the number of abstract states.
int rank_fact(int idx, int val) const
Ranks a projection fact by multiplying the ranking coefficient of fact's variable with the fact's val...
StateRank get_abstract_rank(const State &state) const
Get the rank of the abstract state induced by a state.
StateRankingFunction(const VariablesProxy &variables, Pattern pattern)
Constructs the ranking function for a projection specified by a given pattern and the task's variable...
bool next_rank(StateRank &s, std::span< int > mutable_variables) const
Compute the next-highest rank that corresponds to the same abstract state modulo a given subset of pr...
long long int get_multiplier(int i) const
Get the ranking coefficient for variable of the projection.
std::vector< int > unrank(StateRank abstract_state) const
Unrank a given state rank and converts it into an explicit abstract state.
const Pattern & get_pattern() const
Get the pattern of the projection.
unsigned int num_vars() const
Get the number of variables considered by the projection.
int get_domain_size(int i) const
Get the domain size for a projection variable.
const AssignmentEnumerator & get_enumerator() const
Get the assignment enumerator for the projection's assignments.
int value_of(StateRank rank, int idx) const
Compute the value of a projection variable for the abstract state of a state rank.
Namespace dedicated to probabilistic pattern databases.
Definition gzocp_heuristic.h:16