diff --git a/CHANGELOG-FORK.md b/CHANGELOG-FORK.md index deac0b433fd..eb1370990e6 100644 --- a/CHANGELOG-FORK.md +++ b/CHANGELOG-FORK.md @@ -4,7 +4,8 @@ Changes from v10.2.0 - Feature: - ADDED **HTTP API** `annotation/ways` in OSRM route response after `osrm-ranking` process(retrieve `annotation/ways` from `annotation/nodes`) [#296](https://github.com/Telenav/osrm-backend/pull/296) - CHANGED for internal refactoring, moved `unidbpatch` and `mapsource` packages into `integration/util` folder [#300](https://github.com/Telenav/osrm-backend/pull/300) - - CHANGED for internal refactoring, refactor staiongraph to isolate algorithm, data structure and topological [#302] + - CHANGED for internal refactoring, refactor stationgraph to isolate algorithm, data structure and topological [#302](https://github.com/Telenav/osrm-backend/pull/302) + - CHANGED for internal refactoring, change `edgeIDAndData` to `edge` and replace internal location definition with nav.Location [#307](https://github.com/Telenav/osrm-backend/pull/307) - Bugfix: - CHANGED `osrm-ranking` parsing of OSRM route response to compatible with `string` array `annotation/nodes` [#296](https://github.com/Telenav/osrm-backend/pull/296) - Performance: diff --git a/integration/service/oasis/stationgraph/edge.go b/integration/service/oasis/stationgraph/edge.go index a5b4c174592..f044d9e59b3 100644 --- a/integration/service/oasis/stationgraph/edge.go +++ b/integration/service/oasis/stationgraph/edge.go @@ -11,6 +11,6 @@ type edgeMetric struct { } type edge struct { - edgeId edgeID - edgeData *edgeMetric + edgeId edgeID + edgeMetric *edgeMetric } diff --git a/integration/service/oasis/stationgraph/graph_mock.go b/integration/service/oasis/stationgraph/graph_mock.go index 1af78fad4d7..5cb86819c33 100644 --- a/integration/service/oasis/stationgraph/graph_mock.go +++ b/integration/service/oasis/stationgraph/graph_mock.go @@ -1126,7 +1126,7 @@ func (graph *mockGraph) Edge(from, to nodeID) *edgeMetric { if ok { for _, edge := range edges { if edge.edgeId.toNodeID == to { - return edge.edgeData + return edge.edgeMetric } } } diff --git a/integration/service/oasis/stationgraph/node_graph.go b/integration/service/oasis/stationgraph/node_graph.go index 57b0be4f206..7e50839b636 100644 --- a/integration/service/oasis/stationgraph/node_graph.go +++ b/integration/service/oasis/stationgraph/node_graph.go @@ -13,7 +13,7 @@ type edgeID2EdgeData map[edgeID]*edgeMetric type nodeGraph struct { nodeContainer *nodeContainer adjacentList nodeID2AdjacentNodes - edgeData edgeID2EdgeData + edgeMetric edgeID2EdgeData startNodeID nodeID endNodeID nodeID strategy chargingstrategy.Strategy @@ -25,7 +25,7 @@ func NewNodeGraph(strategy chargingstrategy.Strategy, query connectivitymap.Quer return &nodeGraph{ nodeContainer: newNodeContainer(), adjacentList: make(nodeID2AdjacentNodes), - edgeData: make(edgeID2EdgeData), + edgeMetric: make(edgeID2EdgeData), startNodeID: invalidNodeID, endNodeID: invalidNodeID, strategy: strategy, @@ -63,7 +63,7 @@ func (g *nodeGraph) Edge(from, to nodeID) *edgeMetric { toNodeID: to, } - return g.edgeData[edgeID] + return g.edgeMetric[edgeID] } // SetStart generates start node for the nodeGraph @@ -115,7 +115,7 @@ func (g *nodeGraph) createLogicalNodes(from nodeID, toStationID string, toLocati endNodeID := g.EndNodeID() if toStationID == g.StationID(endNodeID) { results = append(results, g.Node(endNodeID)) - g.edgeData[edgeID{from, endNodeID}] = &edgeMetric{ + g.edgeMetric[edgeID{from, endNodeID}] = &edgeMetric{ distance: distance, duration: duration} return results @@ -127,7 +127,7 @@ func (g *nodeGraph) createLogicalNodes(from nodeID, toStationID string, toLocati Lon: toLocation.Lon}) results = append(results, n) - g.edgeData[edgeID{from, n.id}] = &edgeMetric{ + g.edgeMetric[edgeID{from, n.id}] = &edgeMetric{ distance: distance, duration: duration} }