Class GraphUtil

  • public final class GraphUtil
    extends Object
    • Method Detail

      • toDot

        public static <V> String toDot​(Collection<? extends V> vertices,
                                       Function<? super V,​? extends Collection<? extends V>> successorFun,
                                       Function<? super V,​GraphUtil.DotColor> colorFun,
                                       Function<? super V,​String> labelFun)
        Generate a DOT representation for a graph.
        Type Parameters:
        V - Type of vertex, must be usable as map key (equals/hash)
        vertices - Set of vertices
        successorFun - Function fetching successors
        colorFun - Color of vertex box
        labelFun - Vertex label