Interface NetworkXFormat


  • public interface NetworkXFormat
    Utilities for handling pickled NetworkX graphs.
    See Also:
    NetworkX, Pickle
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static <V> org.jgrapht.Graph<V,​org.jgrapht.graph.DefaultWeightedEdge> load​(net.razorvine.pickle.objects.ClassDict nx)
      Reconstruct a Graph object from the unpickled NetworkX graph.
      static net.razorvine.pickle.objects.ClassDict parse​(InputStream stream)
      Unpickle the NetworkX graph from the input stream.
    • Method Detail

      • parse

        static net.razorvine.pickle.objects.ClassDict parse​(InputStream stream)
                                                     throws IOException
        Unpickle the NetworkX graph from the input stream.
        Parameters:
        stream - the input stream with pickled data
        Returns:
        an unpickled NetworkX graph
        Throws:
        IOException - if an I/O error occurs
      • load

        static <V> org.jgrapht.Graph<V,​org.jgrapht.graph.DefaultWeightedEdge> load​(net.razorvine.pickle.objects.ClassDict nx)
        Reconstruct a Graph object from the unpickled NetworkX graph.

        Please be careful with the type of the nodes.

        Type Parameters:
        V - the type of nodes in the graph
        Parameters:
        nx - the unpickled NetworkX graph
        Returns:
        a graph represented in the unpickled graph