Package org.jgrapht.io
Class Graph6Sparse6Importer<V,E>
- java.lang.Object
-
- org.jgrapht.io.Graph6Sparse6Importer<V,E>
-
- Type Parameters:
V
- graph vertex typeE
- graph edge type
- All Implemented Interfaces:
GraphImporter<V,E>
@Deprecated public class Graph6Sparse6Importer<V,E> extends Object implements GraphImporter<V,E>
Deprecated.UseGraph6Sparse6Importer
insteadImporter which reads graphs in graph6 or sparse6 format. A description of the format can be found here. graph6 and sparse6 are formats for storing undirected graphs in a compact manner, using only printable ASCII characters. Files in these formats have text Format and contain one line per graph. graph6 is suitable for small graphs, or large dense graphs. sparse6 is more space-efficient for large sparse graphs. Typically, files storing graph6 graphs have the 'g6' extension. Similarly, files storing sparse6 graphs have a 's6' file extension. sparse6 graphs support loops and multiple edges, graph6 graphs do not.- Author:
- Joris Kinable
-
-
Field Summary
Fields Modifier and Type Field Description protected EdgeProvider<V,E>
edgeProvider
Deprecated.Constructs new edgesprotected ComponentUpdater<Graph<V,E>>
graphUpdater
Deprecated.Updates graph propertiesprotected VertexProvider<V>
vertexProvider
Deprecated.Constructs new verticesprotected ComponentUpdater<V>
vertexUpdater
Deprecated.Updates already constructed vertices
-
Constructor Summary
Constructors Constructor Description Graph6Sparse6Importer(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider)
Deprecated.Construct a new Graph6Sparse6ImporterGraph6Sparse6Importer(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, double defaultWeight)
Deprecated.Construct a new Graph6Sparse6Importer
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description EdgeProvider<V,E>
getEdgeProvider()
Deprecated.Get the edge providerComponentUpdater<Graph<V,E>>
getGraphUpdater()
Deprecated.Get the graph updater.VertexProvider<V>
getVertexProvider()
Deprecated.Get the vertex providerComponentUpdater<V>
getVertexUpdater()
Deprecated.Get the vertex updatervoid
importGraph(Graph<V,E> g, Reader input)
Deprecated.Import a graphvoid
importGraph(Graph<V,E> g, String g6)
Deprecated.Import the graph represented by a String in graph6 or sparse6 encoding.void
setEdgeProvider(EdgeProvider<V,E> edgeProvider)
Deprecated.Set the edge provider.void
setGraphUpdater(ComponentUpdater<Graph<V,E>> graphUpdater)
Deprecated.Set the graph updater.void
setVertexProvider(VertexProvider<V> vertexProvider)
Deprecated.Set the vertex providervoid
setVertexUpdater(ComponentUpdater<V> vertexUpdater)
Deprecated.Set the vertex updater.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.io.GraphImporter
importGraph, importGraph
-
-
-
-
Field Detail
-
vertexProvider
protected VertexProvider<V> vertexProvider
Deprecated.Constructs new vertices
-
edgeProvider
protected EdgeProvider<V,E> edgeProvider
Deprecated.Constructs new edges
-
vertexUpdater
protected ComponentUpdater<V> vertexUpdater
Deprecated.Updates already constructed vertices
-
graphUpdater
protected ComponentUpdater<Graph<V,E>> graphUpdater
Deprecated.Updates graph properties
-
-
Constructor Detail
-
Graph6Sparse6Importer
public Graph6Sparse6Importer(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, double defaultWeight)
Deprecated.Construct a new Graph6Sparse6Importer- Parameters:
vertexProvider
- provider for the generation of vertices. Must not be null.edgeProvider
- provider for the generation of edges. Must not be null.defaultWeight
- default edge weight
-
Graph6Sparse6Importer
public Graph6Sparse6Importer(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider)
Deprecated.Construct a new Graph6Sparse6Importer- Parameters:
vertexProvider
- provider for the generation of vertices. Must not be null.edgeProvider
- provider for the generation of edges. Must not be null.
-
-
Method Detail
-
importGraph
public void importGraph(Graph<V,E> g, Reader input) throws ImportException
Deprecated.Description copied from interface:GraphImporter
Import a graph- Specified by:
importGraph
in interfaceGraphImporter<V,E>
- Parameters:
g
- the graphinput
- the input reader- Throws:
ImportException
- in case any error occurs, such as I/O or parse error
-
importGraph
public void importGraph(Graph<V,E> g, String g6) throws ImportException
Deprecated.Import the graph represented by a String in graph6 or sparse6 encoding.- Parameters:
g
- the graphg6
- String representation of a graph either in graph6 or sparse6 format. WARNING: a g6/s6 string may contain backslashes '\'. Escaping is required when invoking this method directly. E.g.importgraph(g,":?@MnDA\oi")
importgraph(g,":?@MnDA\\oi")
- Throws:
ImportException
- in case any error occurs, such as I/O or parse error
-
getVertexProvider
public VertexProvider<V> getVertexProvider()
Deprecated.Get the vertex provider- Returns:
- the vertex provider
-
setVertexProvider
public void setVertexProvider(VertexProvider<V> vertexProvider)
Deprecated.Set the vertex provider- Parameters:
vertexProvider
- the new vertex provider. Must not be null.
-
getEdgeProvider
public EdgeProvider<V,E> getEdgeProvider()
Deprecated.Get the edge provider- Returns:
- The edge provider
-
setEdgeProvider
public void setEdgeProvider(EdgeProvider<V,E> edgeProvider)
Deprecated.Set the edge provider.- Parameters:
edgeProvider
- the new edge provider. Must not be null.
-
getVertexUpdater
public ComponentUpdater<V> getVertexUpdater()
Deprecated.Get the vertex updater- Returns:
- the vertex updater
-
setVertexUpdater
public void setVertexUpdater(ComponentUpdater<V> vertexUpdater)
Deprecated.Set the vertex updater.- Parameters:
vertexUpdater
- the new vertex updater. Must not be null.
-
getGraphUpdater
public ComponentUpdater<Graph<V,E>> getGraphUpdater()
Deprecated.Get the graph updater.- Returns:
- the graph updater
-
setGraphUpdater
public void setGraphUpdater(ComponentUpdater<Graph<V,E>> graphUpdater)
Deprecated.Set the graph updater.- Parameters:
graphUpdater
- the new graph updater. Must not be null.
-
-