V
- graph vertex typeE
- graph edge typepublic class Graph6Sparse6Exporter<V,E> extends Object implements GraphExporter<V,E>
In particular, the length of a Graph6 string representation of a graph depends only on the number of vertices. However, this also means that graphs with few edges take as much space as graphs with many edges. On the other hand, Sparse6 is a variable length format which can use dramatically less space for sparse graphs but can have a much larger storage size for dense graphs.
Modifier and Type | Class and Description |
---|---|
static class |
Graph6Sparse6Exporter.Format
Format type: graph6 (g6) or sparse6(s6)
|
Modifier and Type | Field and Description |
---|---|
static Graph6Sparse6Exporter.Format |
DEFAULT_GRAPH6SPARSE6_FORMAT
The default format used by the exporter.
|
Constructor and Description |
---|
Graph6Sparse6Exporter()
Constructs a new exporter with a given vertex ID provider.
|
Graph6Sparse6Exporter(Graph6Sparse6Exporter.Format format)
Constructs a new exporter with a given vertex ID provider.
|
Modifier and Type | Method and Description |
---|---|
void |
exportGraph(Graph<V,E> g,
Writer writer)
Export a graph
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exportGraph, exportGraph
public static final Graph6Sparse6Exporter.Format DEFAULT_GRAPH6SPARSE6_FORMAT
public Graph6Sparse6Exporter()
public Graph6Sparse6Exporter(Graph6Sparse6Exporter.Format format)
format
- the format to usepublic void exportGraph(Graph<V,E> g, Writer writer) throws ExportException
GraphExporter
exportGraph
in interface GraphExporter<V,E>
g
- the graph to exportwriter
- the output writerExportException
- in case any error occursCopyright © 2019. All rights reserved.