Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCUMENTATION] Convenient code blocks and naming #20

Closed
LdDl opened this issue Oct 9, 2021 · 0 comments · Fixed by #22
Closed

[DOCUMENTATION] Convenient code blocks and naming #20

LdDl opened this issue Oct 9, 2021 · 0 comments · Fixed by #22
Assignees

Comments

@LdDl
Copy link
Owner

LdDl commented Oct 9, 2021

What is your docs question about? Ask it
Well, there are many code with some unclear priority queue stuff, such as:

...distance.distance = vertex.distance.distance + cost
...distance.contractionID = contractionID 
...distance.sourceID = sourceID

What do you suggest?

  1. Refactor code to make in clear for developer.
    E.g. merge relaxEdges() and dijkstra() function in one (something like dijkstra_witness)
  2. Make some kind of wiki-code in comments' sections
    E.g. explain what this code does
// checkID Checks if both source's and target's contraction ID are not equal
func (graph *Graph) checkID(source, target int64) bool {
	s := graph.Vertices[source].distance
	t := graph.Vertices[target].distance
	return s.contractionID != t.contractionID || s.sourceID != t.sourceID
}

Additional context
nope

@LdDl LdDl self-assigned this Oct 9, 2021
@LdDl LdDl linked a pull request Oct 10, 2021 that will close this issue
@LdDl LdDl closed this as completed in #22 Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant