Beispiel #1
0
 /// <summary>
 /// Relocates data internally in the most compact way possible.
 /// </summary>
 /// <param name="updateEdgeId">The edge id's may change. This action can be used to hook into every change.</param>
 public void Compress(Action <uint, uint> updateEdgeId)
 {
     _graph.Compress((originalId, newId) =>
     {
         updateEdgeId(originalId, newId);
         _shapes.Switch(originalId, newId);
     });
     _shapes.Resize(_graph.EdgeCount);
     _coordinates.Resize(_graph.VertexCapacity * 2);
 }
Beispiel #2
0
 /// <summary>
 /// Relocates data internally in the most compact way possible.
 /// </summary>
 /// <param name="updateEdgeId">The edge id's may change. This action can be used to hook into every change.</param>
 public void Compress(Action <uint, uint> updateEdgeId)
 {
     _graph.Compress((originalId, newId) =>
     {
         updateEdgeId(originalId, newId);
         _shapes.Switch(originalId, newId);
     });
     _shapes.Resize(_graph.EdgeCount);
     if (_coordinates.Length > _graph.VertexCapacity * 2)
     {
         _coordinates.Resize(_graph.VertexCapacity * 2);
     }
     if (_elevation != null && _elevation.Length > _graph.VertexCapacity)
     {
         _elevation?.Resize(_graph.VertexCapacity);
     }
 }