#ifndef _SHORTEST_PATH_ #define _SHORTEST_PATH_ struct location_t; // h struct node_t { node_t* next; location_t* location; node_t* from; double from_origin; double total; bool visited; node_t(node_t* next, location_t* location, node_t* from, double from_origin, double total); void update(node_t* from, double from_origin, double total); }; struct shortest_path_t { node_t* head; node_t* base; location_t* from; location_t* to; shortest_path_t(location_t* from, location_t* to) : head{nullptr}, from{from}, to{to} { } ~shortest_path_t(); void compute(); void display_rec(node_t* cur); void display(); }; #endif