Uses of Interface
cloud.opencode.base.collections.graph.Graph
Packages that use Graph
Package
Description
Graph Collections Package - Graph Data Structures
图集合包 - 图数据结构
-
Uses of Graph in cloud.opencode.base.collections.graph
Classes in cloud.opencode.base.collections.graph that implement GraphModifier and TypeClassDescriptionfinal classMutableGraph<N>MutableGraph - Mutable Graph Implementation MutableGraph - 可变图实现Methods in cloud.opencode.base.collections.graph with parameters of type GraphModifier and TypeMethodDescriptionFind all paths between two nodes (limited by max depth).static <N> List<N> Perform breadth-first search starting from the given node.static <N> voidPerform BFS with a visitor function.static <N> Optional<N> Perform BFS until a condition is met.GraphTraversalUtil.connectedComponents(Graph<N> graph) Find all connected components in an undirected graph.static <N> List<N> Perform depth-first search starting from the given node.static <N> voidPerform DFS with a visitor function.static <N> List<N> GraphTraversalUtil.dfsIterative(Graph<N> graph, N startNode) Perform iterative depth-first search.static <N> booleanCheck if the graph has a cycle.static <N> booleanCheck if there is a path between two nodes.static <N> booleanGraphTraversalUtil.isConnected(Graph<N> graph) Check if the graph is connected (for undirected graphs).static <N> booleanCheck if the graph is a DAG (Directed Acyclic Graph).static <N> Set<N> GraphTraversalUtil.reachableFrom(Graph<N> graph, N startNode) Get all reachable nodes from a starting node.GraphTraversalUtil.shortestPath(Graph<N> graph, N source, N target) Find the shortest path between two nodes using BFS.GraphTraversalUtil.stronglyConnectedComponents(Graph<N> graph) Find all strongly connected components in a directed graph (Kosaraju's algorithm).static <N> List<N> GraphTraversalUtil.topologicalSort(Graph<N> graph) Perform topological sort on a directed acyclic graph (DAG).GraphTraversalUtil.topologicalSortKahn(Graph<N> graph) Perform topological sort using Kahn's algorithm.