Class Neighbors


  • public final class Neighbors
    extends Object
    Utilities for extracting neighborhood graphs and iterating over them.
    • Method Detail

      • graph

        public static <V,​E> org.jgrapht.Graph<V,​E> graph​(org.jgrapht.Graph<V,​E> graph,
                                                                     V node)
        Extract the neighborhood graph for the given node.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Parameters:
        graph - the graph
        node - the target node
        Returns:
        a neighborhood of node