misc: Fix typos and spelling errors

This commit is contained in:
Edward Toroshchyn
2025-02-24 15:59:00 +01:00
parent 1f90de31e7
commit c25a2a257b
40 changed files with 62 additions and 62 deletions

View File

@@ -240,7 +240,7 @@ func (g *Graph) DeleteVertex(xv ...Vertex) {
// AddEdge adds a directed edge to the graph from v1 to v2.
func (g *Graph) AddEdge(v1, v2 Vertex, e Edge) {
// NOTE: this doesn't allow more than one edge between two vertexes...
// NOTE: this doesn't allow more than one edge between two vertices...
g.AddVertex(v1, v2) // supports adding N vertices now
// TODO: check if an edge exists to avoid overwriting it!
// NOTE: VertexMerge() depends on overwriting it at the moment...
@@ -856,7 +856,7 @@ Loop:
// check edges
for v1 := range g.Adjacency() { // for each vertex in g
v2 := m[v1] // lookup in map to get correspondance
v2 := m[v1] // lookup in map to get correspondence
// g.Adjacency()[v1] corresponds to graph.Adjacency()[v2]
if e1, e2 := len(g.Adjacency()[v1]), len(graph.Adjacency()[v2]); e1 != e2 {
return fmt.Errorf("base graph, vertex(%s) has %d edges, while input graph, vertex(%s) has %d", v1, e1, v2, e2)