Closed LdDl closed 3 years ago
Vertex struct contains 4 fields currently. They are:
inEdges []int64 inECost []float64 outEdges []int64 outECost []float64
I think such code has not good readability, so I prepared more readable code, but with same meaning/perfomance/number of allocations:
inIncidentEdges []incidentEdge outIncidentEdges []incidentEdge
, where incidentEdge is:
// incidentEdge incident edge to correspondence type incidentEdge struct { vertexID int64 // <---- This is replacement for INT64 in inEdges/outEdges cost float64 // <---- This is replacement for FLOAT64in inECost/outECost }
Vertex struct contains 4 fields currently. They are:
I think such code has not good readability, so I prepared more readable code, but with same meaning/perfomance/number of allocations:
, where incidentEdge is: