Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabortim committed Oct 8, 2023
1 parent defb5ff commit 85735a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/org/openstreetmap/josm/data/osm/NodeGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.openstreetmap.josm.tools.Pair;

/**
* A directed or undirected graph of nodes.
* A directed or undirected graph of nodes. Nodes are connected via edges represented by NodePair instances.
*
* @since 12463 (extracted from CombineWayAction)
*/
Expand Down Expand Up @@ -211,8 +211,10 @@ public Set<Node> getNodes() {
}

/**
* Creates a lookup table from the existing edges to make querying possible.
* @return a map containing all the graph data, where the key is queryable, values are direct successors of the key node
* Constructs a lookup table from the existing edges in the graph to enable efficient querying.
* This method creates a map where each node is associated with a list of nodes that are directly connected to it.
*
* @return A map representing the graph structure, where nodes are keys, and values are their direct successors.
* @since xxx
*/
public Map<Node, List<Node>> createMap() {
Expand Down

0 comments on commit 85735a7

Please sign in to comment.