addEdge method
Implementation
void addEdge(List<List<List<Edge?>>> edges, int position, Edge edge) {
final vertexIndex = position + edge.characterLength;
final modeEdges = edges[vertexIndex][edge.charsetEncoderIndex];
final modeOrdinal = getCompactedOrdinal(edge.mode);
if (modeEdges[modeOrdinal] == null ||
modeEdges[modeOrdinal]!.cachedTotalSize > edge.cachedTotalSize) {
modeEdges[modeOrdinal] = edge;
}
}