Opened 11 years ago
Closed 11 years ago
#5737 closed Bugs (fixed)
length-1 grid graph gives wrong previous vertex
Reported by: | Owned by: | Andrew Sutton | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The previous function miscalculates the vertex index along a dimension where the grid graph's length is one. The computed vertex index is one when it should be zero. The offending code is "vertex[dimension_index] = ... length(dimension_index) - (distance % length(dimension_index))."
Attachments (1)
Change History (3)
by , 11 years ago
Attachment: | grid_graph_example.cpp added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Will keep that in mind. Thank you for your response!
Note:
See TracTickets
for help on using tickets.
This is a documented limitation (although the documentation on it may be incorrect). Each dimension needs to have a length of at least three (two when wrapping is enabled) for correct behavior, including in more cases than you describe such as computing outgoing edges.