Bug 232 - getPath(node) return null when the is the source node
Summary: getPath(node) return null when the is the source node
Status: RESOLVED FIXED
Alias: None
Product: Group 1
Classification: Unclassified
Component: Dijkstra (show other bugs)
Version: v0.2-beta
Hardware: PC Mac OS
: Lowest trivial
Assignee: sherlockqiu
URL:
Depends on:
Blocks:
 
Reported: 2017-11-29 16:52 HKT by ZHENG Wanying
Modified: 2017-11-29 17:44 HKT (History)
1 user (show)

See Also:


Attachments
The source code (3.82 KB, text/plain)
2017-11-29 16:52 HKT, ZHENG Wanying
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ZHENG Wanying 2017-11-29 16:52:14 HKT
Created attachment 10 [details]
The source code

getPath(source) should return [source]
Comment 1 sherlockqiu 2017-11-29 17:44:58 HKT
Hi Wanying,

Thanks for your feedback.
According to the description of Dijkstra's algorithm source node is not reachable to itself so in this case, it would be ok to return null rather than source.

However, you remind me that there should be a handler in Company component so that if there is only one branch it would also be reachable.