LdDl / ch

Contraction Hierarchies (with bidirectional version of Dijkstra's algorithm) technique for computing shortest path in graph.
Apache License 2.0
47 stars 5 forks source link

[FEATURE REQUEST] Getter/setter for attribute 'orderPos' #12

Closed LdDl closed 3 years ago

LdDl commented 3 years ago

Is your feature request related to a problem? Please describe. Currently field

type Vertex struct {
    ...
    orderPos int
        ...
}

is unexported. For extended debugging in external appliactions and import/export function we need to make getter/setter for it.

Describe the solution you'd like and provide pseudocode examples if you can Pretty simple getter/setter combo:

func (vertex *Vertex) OrderPos() int {
    return vertex.orderPos
}
func (vertex *Vertex) SetOrderPos(orderPos int){
    vertex.orderPos = orderPos
}

Describe alternatives you've considered and provide pseudocode examples if you can Nope

Additional context This issue is related to #11

LdDl commented 3 years ago

This is related to #11 since those two unexported fields could be useful for external applications (and export/import graph function)