V - the graph vertex typeE - the graph edge typepublic class MatrixExporter<V,E> extends Object implements GraphExporter<V,E>
The exporter supports three different formats, see MatrixExporter.Format.
MatrixExporter.Format| Modifier and Type | Class and Description |
|---|---|
static class |
MatrixExporter.Format
Formats supported by the exporter.
|
| Constructor and Description |
|---|
MatrixExporter()
Creates a new MatrixExporter with integer name provider for the vertex identifiers and
MatrixExporter.Format.SPARSE_ADJACENCY_MATRIX as the default format. |
MatrixExporter(MatrixExporter.Format format)
Creates a new MatrixExporter with integer name provider for the vertex identifiers.
|
MatrixExporter(MatrixExporter.Format format,
VertexNameProvider<V> vertexIDProvider)
Creates a new MatrixExporter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
exportAdjacencyMatrix(Writer output,
DirectedGraph<V,E> g)
Deprecated.
|
void |
exportAdjacencyMatrix(Writer output,
UndirectedGraph<V,E> g)
Deprecated.
|
void |
exportGraph(Graph<V,E> g,
Writer writer)
Export a graph
|
void |
exportLaplacianMatrix(Writer output,
UndirectedGraph<V,E> g)
Deprecated.
|
void |
exportNormalizedLaplacianMatrix(Writer output,
UndirectedGraph<V,E> g)
Deprecated.
|
MatrixExporter.Format |
getFormat()
Get the format that the exporter is using.
|
void |
setFormat(MatrixExporter.Format format)
Set the output format of the exporter
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexportGraph, exportGraphpublic MatrixExporter()
MatrixExporter.Format.SPARSE_ADJACENCY_MATRIX as the default format.public MatrixExporter(MatrixExporter.Format format)
format - format to usepublic MatrixExporter(MatrixExporter.Format format, VertexNameProvider<V> vertexIDProvider)
format - format to usevertexIDProvider - for generating vertex identifiers. Must not be null.public MatrixExporter.Format getFormat()
public void setFormat(MatrixExporter.Format format)
format - the format to usepublic void exportGraph(Graph<V,E> g, Writer writer) throws ExportException
GraphExporterexportGraph in interface GraphExporter<V,E>g - the graph to exportwriter - the output writerExportException - in case any error occurs@Deprecated public void exportAdjacencyMatrix(Writer output, UndirectedGraph<V,E> g)
output - the writer to which the graph to be exported.g - the graph to be exported.@Deprecated public void exportAdjacencyMatrix(Writer output, DirectedGraph<V,E> g)
output - the writer to which the graph to be exported.g - the graph to be exported.@Deprecated public void exportLaplacianMatrix(Writer output, UndirectedGraph<V,E> g)
output - the writer to which the graph is to be exported.g - the graph to be exported.@Deprecated public void exportNormalizedLaplacianMatrix(Writer output, UndirectedGraph<V,E> g)
output - the writer to which the graph is to be exported.g - the graph to be exported.Copyright © 2016. All rights reserved.