Package org.nlpub.watset.util
Interface NetworkXFormat
-
-
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 aGraphobject from the unpickled NetworkX graph.static net.razorvine.pickle.objects.ClassDictparse(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 aGraphobject 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
-
-