Skip to content

Commit

Permalink
Merge pull request #13 from LdDl/issue-11-12
Browse files Browse the repository at this point in the history
Issue 11 12
  • Loading branch information
LdDl committed Feb 20, 2021
2 parents 99513dc + 6a80304 commit e3d1382
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions vertex.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ch

import (
"fmt"
"math"
)

Expand All @@ -24,9 +23,24 @@ type Vertex struct {
importance int
}

// PrintInOut Print infromation about out and in edges
func (vertex *Vertex) PrintInOut() {
fmt.Println(vertex.outEdges, vertex.inEdges)
// OrderPos Returns order position (in terms of contraction hierarchies) of vertex
func (vertex *Vertex) OrderPos() int {
return vertex.orderPos
}

// SetOrderPos Sets order position (in terms of contraction hierarchies) for vertex
func (vertex *Vertex) SetOrderPos(orderPos int) {
vertex.orderPos = orderPos
}

// Importance Returns importance (in terms of contraction hierarchies) of vertex
func (vertex *Vertex) Importance() int {
return vertex.importance
}

// SetImportance Sets order position (in terms of contraction hierarchies) for vertex
func (vertex *Vertex) SetImportance(importance int) {
vertex.importance = importance
}

// MakeVertex Create vertex with label
Expand Down

0 comments on commit e3d1382

Please sign in to comment.