Skip to content

Commit

Permalink
graph/iterator: fix English
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Jun 24, 2021
1 parent 5ed7775 commit a382475
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions graph/iterator/nodes_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Nodes struct {
// match the graph.Node IDs, and the map keys are not used.
//
// Behavior of the Nodes is unspecified if nodes is mutated after
// the call the NewNodes.
// the call to NewNodes.
func NewNodes(nodes map[int64]graph.Node) *Nodes {
return &Nodes{nodes: len(nodes), iter: newMapIterNodes(nodes)}
}
Expand Down Expand Up @@ -92,7 +92,7 @@ type NodesByEdge struct {
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or edges
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByEdge(nodes map[int64]graph.Node, edges map[int64]graph.Edge) *NodesByEdge {
return &NodesByEdge{nodes: nodes, edges: len(edges), iter: newMapIterEdges(edges)}
}
Expand All @@ -105,7 +105,7 @@ func NewNodesByEdge(nodes map[int64]graph.Node, edges map[int64]graph.Edge) *Nod
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or edges
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByWeightedEdge(nodes map[int64]graph.Node, edges map[int64]graph.WeightedEdge) *NodesByEdge {
return &NodesByEdge{nodes: nodes, edges: len(edges), iter: newMapIterByWeightedEdges(edges)}
}
Expand All @@ -118,7 +118,7 @@ func NewNodesByWeightedEdge(nodes map[int64]graph.Node, edges map[int64]graph.We
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or lines
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByLines(nodes map[int64]graph.Node, lines map[int64]map[int64]graph.Line) *NodesByEdge {
return &NodesByEdge{nodes: nodes, edges: len(lines), iter: newMapIterByLines(lines)}
}
Expand All @@ -131,7 +131,7 @@ func NewNodesByLines(nodes map[int64]graph.Node, lines map[int64]map[int64]graph
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or lines
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByWeightedLines(nodes map[int64]graph.Node, lines map[int64]map[int64]graph.WeightedLine) *NodesByEdge {
return &NodesByEdge{nodes: nodes, edges: len(lines), iter: newMapIterByWeightedLines(lines)}
}
Expand Down
10 changes: 5 additions & 5 deletions graph/iterator/nodes_map_safe.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Nodes struct {
// match the graph.Node IDs, and the map keys are not used.
//
// Behavior of the Nodes is unspecified if nodes is mutated after
// the call the NewNodes.
// the call to NewNodes.
func NewNodes(nodes map[int64]graph.Node) *Nodes {
rv := reflect.ValueOf(nodes)
return &Nodes{nodes: rv, iter: rv.MapRange()}
Expand Down Expand Up @@ -97,7 +97,7 @@ type NodesByEdge struct {
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or edges
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByEdge(nodes map[int64]graph.Node, edges map[int64]graph.Edge) *NodesByEdge {
rv := reflect.ValueOf(edges)
return &NodesByEdge{nodes: nodes, edges: rv, iter: rv.MapRange()}
Expand All @@ -111,7 +111,7 @@ func NewNodesByEdge(nodes map[int64]graph.Node, edges map[int64]graph.Edge) *Nod
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or edges
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByWeightedEdge(nodes map[int64]graph.Node, edges map[int64]graph.WeightedEdge) *NodesByEdge {
rv := reflect.ValueOf(edges)
return &NodesByEdge{nodes: nodes, edges: rv, iter: rv.MapRange()}
Expand All @@ -125,7 +125,7 @@ func NewNodesByWeightedEdge(nodes map[int64]graph.Node, edges map[int64]graph.We
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or lines
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByLines(nodes map[int64]graph.Node, lines map[int64]map[int64]graph.Line) *NodesByEdge {
rv := reflect.ValueOf(lines)
return &NodesByEdge{nodes: nodes, edges: rv, iter: rv.MapRange()}
Expand All @@ -139,7 +139,7 @@ func NewNodesByLines(nodes map[int64]graph.Node, lines map[int64]map[int64]graph
// and the map keys are not used.
//
// Behavior of the NodesByEdge is unspecified if nodes or lines
// is mutated after the call the NewNodes.
// is mutated after the call to NewNodes.
func NewNodesByWeightedLines(nodes map[int64]graph.Node, lines map[int64]map[int64]graph.WeightedLine) *NodesByEdge {
rv := reflect.ValueOf(lines)
return &NodesByEdge{nodes: nodes, edges: rv, iter: rv.MapRange()}
Expand Down

0 comments on commit a382475

Please sign in to comment.