The current implementation will create a fully connected transition graph where candidates with the shortest path distance not found will still be connected with a distance of positive infinity. This design is problematic as the transition probability of 0 may still be returned as the optimal path.
To address this issue, avoid creating a connection if there is no path found between two candidates so that it can be guaranteed that an optimal path found from the transition graph could always be found.
The current implementation will create a fully connected transition graph where candidates with the shortest path distance not found will still be connected with a distance of positive infinity. This design is problematic as the transition probability of 0 may still be returned as the optimal path.
To address this issue, avoid creating a connection if there is no path found between two candidates so that it can be guaranteed that an optimal path found from the transition graph could always be found.