org.jetbrains.kotlin.utils
Class DFS
java.lang.Object
org.jetbrains.kotlin.utils.DFS
public class DFS
- extends java.lang.Object
Constructor Summary |
DFS()
|
Method Summary |
static
|
dfs(java.util.Collection<N> nodes,
DFS.Neighbors<N> neighbors,
DFS.NodeHandler<N,R> handler)
|
static
|
dfs(java.util.Collection<N> nodes,
DFS.Neighbors<N> neighbors,
DFS.Visited<N> visited,
DFS.NodeHandler<N,R> handler)
|
static
|
dfsFromNode(N node,
DFS.Neighbors<N> neighbors,
DFS.Visited<N> visited)
|
static
|
dfsFromNode(N node,
DFS.Neighbors<N> neighbors,
DFS.Visited<N> visited,
DFS.NodeHandler<N,R> handler)
|
static
|
ifAny(java.util.Collection<N> nodes,
DFS.Neighbors<N> neighbors,
kotlin.jvm.functions.Function1<N,java.lang.Boolean> predicate)
|
static
|
topologicalOrder(java.lang.Iterable<N> nodes,
DFS.Neighbors<N> neighbors)
|
static
|
topologicalOrder(java.lang.Iterable<N> nodes,
DFS.Neighbors<N> neighbors,
DFS.Visited<N> visited)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DFS
public DFS()
dfs
public static <N,R> R dfs(@NotNull
java.util.Collection<N> nodes,
@NotNull
DFS.Neighbors<N> neighbors,
@NotNull
DFS.Visited<N> visited,
@NotNull
DFS.NodeHandler<N,R> handler)
dfs
public static <N,R> R dfs(@NotNull
java.util.Collection<N> nodes,
@NotNull
DFS.Neighbors<N> neighbors,
@NotNull
DFS.NodeHandler<N,R> handler)
ifAny
public static <N> java.lang.Boolean ifAny(@NotNull
java.util.Collection<N> nodes,
@NotNull
DFS.Neighbors<N> neighbors,
@NotNull
kotlin.jvm.functions.Function1<N,java.lang.Boolean> predicate)
dfsFromNode
public static <N,R> R dfsFromNode(@NotNull
N node,
@NotNull
DFS.Neighbors<N> neighbors,
@NotNull
DFS.Visited<N> visited,
@NotNull
DFS.NodeHandler<N,R> handler)
dfsFromNode
public static <N> void dfsFromNode(@NotNull
N node,
@NotNull
DFS.Neighbors<N> neighbors,
@NotNull
DFS.Visited<N> visited)
topologicalOrder
public static <N> java.util.List<N> topologicalOrder(@NotNull
java.lang.Iterable<N> nodes,
@NotNull
DFS.Neighbors<N> neighbors,
@NotNull
DFS.Visited<N> visited)
topologicalOrder
public static <N> java.util.List<N> topologicalOrder(@NotNull
java.lang.Iterable<N> nodes,
@NotNull
DFS.Neighbors<N> neighbors)