Symphony 1.0
Loading...
Searching...
No Matches
utils.cpp
Go to the documentation of this file.
1//
2// Created by velocitatem on 12/15/24.
3//
4
5
6#include "search.h"
7
8// node copmarator for priority queue
10public:
11 bool operator()(const std::shared_ptr<Node> &a, const std::shared_ptr<Node> &b) {
12 if (!a || !b) {
13 throw std::invalid_argument("Null node pointer in comparison");
14 }
15 return a->path_cost + a->heuristic > b->path_cost + b->heuristic;
16 }
17};
18
bool operator()(const std::shared_ptr< Node > &a, const std::shared_ptr< Node > &b)
Definition utils.cpp:11