Skip to content

Commit

Permalink
Rename function to match our conventions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemensBuechner committed Sep 8, 2023
1 parent e049da1 commit 54e374a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/search/landmarks/landmark_cost_assignment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ UniformCostPartitioningAlgorithm::UniformCostPartitioningAlgorithm(
use_action_landmarks(use_action_landmarks) {
}

double UniformCostPartitioningAlgorithm::compute_cost_partitioned_h_value(
double UniformCostPartitioningAlgorithm::get_cost_partitioned_heuristic_value(
const LandmarkStatusManager &lm_status_manager,
const State &ancestor_state) {
vector<int> achieved_lms_by_op(operator_costs.size(), 0);
Expand Down Expand Up @@ -175,7 +175,7 @@ lp::LinearProgram OptimalCostPartitioningAlgorithm::build_initial_lp() {
{}, lp_solver.get_infinity());
}

double OptimalCostPartitioningAlgorithm::compute_cost_partitioned_h_value(
double OptimalCostPartitioningAlgorithm::get_cost_partitioned_heuristic_value(
const LandmarkStatusManager &lm_status_manager,
const State &ancestor_state) {
/* TODO: We could also do the same thing with action landmarks we
Expand Down
6 changes: 3 additions & 3 deletions src/search/landmarks/landmark_cost_assignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CostPartitioningAlgorithm {
const LandmarkGraph &graph);
virtual ~CostPartitioningAlgorithm() = default;

virtual double compute_cost_partitioned_h_value(
virtual double get_cost_partitioned_heuristic_value(
const LandmarkStatusManager &lm_status_manager,
const State &ancestor_state) = 0;
};
Expand All @@ -40,7 +40,7 @@ class UniformCostPartitioningAlgorithm : public CostPartitioningAlgorithm {
const LandmarkGraph &graph,
bool use_action_landmarks);

virtual double compute_cost_partitioned_h_value(
virtual double get_cost_partitioned_heuristic_value(
const LandmarkStatusManager &lm_status_manager,
const State &ancestor_state) override;
};
Expand All @@ -64,7 +64,7 @@ class OptimalCostPartitioningAlgorithm : public CostPartitioningAlgorithm {
const LandmarkGraph &graph,
lp::LPSolverType solver_type);

virtual double compute_cost_partitioned_h_value(
virtual double get_cost_partitioned_heuristic_value(
const LandmarkStatusManager &lm_status_manager,
const State &ancestor_state) override;
};
Expand Down
5 changes: 3 additions & 2 deletions src/search/landmarks/landmark_cost_partitioning_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ int LandmarkCostPartitioningHeuristic::get_heuristic_value(
const State &ancestor_state) {
double epsilon = 0.01;

double h_val = cost_partitioning_algorithm->compute_cost_partitioned_h_value(
*lm_status_manager, ancestor_state);
double h_val =
cost_partitioning_algorithm->get_cost_partitioned_heuristic_value(
*lm_status_manager, ancestor_state);
if (h_val == numeric_limits<double>::max()) {
return DEAD_END;
} else {
Expand Down

0 comments on commit 54e374a

Please sign in to comment.