Package org.jgrapht.io
Class MatrixExporter<V,E>
- java.lang.Object
-
- org.jgrapht.io.MatrixExporter<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
GraphExporter<V,E>
@Deprecated public class MatrixExporter<V,E> extends Object implements GraphExporter<V,E>
Deprecated.UseMatrixExporter
instead.Exports a graph to a plain text matrix format, which can be processed by matrix manipulation software, such as MTJ or MATLAB.The exporter supports three different formats, see
MatrixExporter.Format
.- Author:
- Charles Fry, Dimitrios Michail
- See Also:
MatrixExporter.Format
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MatrixExporter.Format
Deprecated.Formats supported by theMatrixExporter
exporter.
-
Field Summary
Fields Modifier and Type Field Description protected ComponentNameProvider<E>
edgeIDProvider
Deprecated.Provides an identifier for an edge.protected ComponentNameProvider<V>
vertexIDProvider
Deprecated.Provides an identifier for a vertex.
-
Constructor Summary
Constructors Constructor Description MatrixExporter()
Deprecated.Creates a new MatrixExporter with integer name provider for the vertex identifiers andMatrixExporter.Format.SPARSE_ADJACENCY_MATRIX
as the default format.MatrixExporter(MatrixExporter.Format format)
Deprecated.Creates a new MatrixExporter with integer name provider for the vertex identifiers.MatrixExporter(MatrixExporter.Format format, ComponentNameProvider<V> vertexIDProvider)
Deprecated.Creates a new MatrixExporter.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
exportGraph(Graph<V,E> g, Writer writer)
Deprecated.Export a graphComponentNameProvider<E>
getEdgeIDProvider()
Deprecated.Get the edge id providerMatrixExporter.Format
getFormat()
Deprecated.Get the format that the exporter is using.ComponentNameProvider<V>
getVertexIDProvider()
Deprecated.Get the vertex id providervoid
setEdgeIDProvider(ComponentNameProvider<E> edgeIDProvider)
Deprecated.Set the edge id provider.void
setFormat(MatrixExporter.Format format)
Deprecated.Set the output format of the exportervoid
setVertexIDProvider(ComponentNameProvider<V> vertexIDProvider)
Deprecated.Set the vertex id provider-
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.GraphExporter
exportGraph, exportGraph
-
-
-
-
Field Detail
-
vertexIDProvider
protected ComponentNameProvider<V> vertexIDProvider
Deprecated.Provides an identifier for a vertex.
-
edgeIDProvider
protected ComponentNameProvider<E> edgeIDProvider
Deprecated.Provides an identifier for an edge.
-
-
Constructor Detail
-
MatrixExporter
public MatrixExporter()
Deprecated.Creates a new MatrixExporter with integer name provider for the vertex identifiers andMatrixExporter.Format.SPARSE_ADJACENCY_MATRIX
as the default format.
-
MatrixExporter
public MatrixExporter(MatrixExporter.Format format)
Deprecated.Creates a new MatrixExporter with integer name provider for the vertex identifiers.- Parameters:
format
- format to use
-
MatrixExporter
public MatrixExporter(MatrixExporter.Format format, ComponentNameProvider<V> vertexIDProvider)
Deprecated.Creates a new MatrixExporter.- Parameters:
format
- format to usevertexIDProvider
- for generating vertex identifiers. Must not be null.
-
-
Method Detail
-
getFormat
public MatrixExporter.Format getFormat()
Deprecated.Get the format that the exporter is using.- Returns:
- the output format
-
setFormat
public void setFormat(MatrixExporter.Format format)
Deprecated.Set the output format of the exporter- Parameters:
format
- the format to use
-
exportGraph
public void exportGraph(Graph<V,E> g, Writer writer) throws ExportException
Deprecated.Description copied from interface:GraphExporter
Export a graph- Specified by:
exportGraph
in interfaceGraphExporter<V,E>
- Parameters:
g
- the graph to exportwriter
- the output writer- Throws:
ExportException
- in case any error occurs
-
getVertexIDProvider
public ComponentNameProvider<V> getVertexIDProvider()
Deprecated.Get the vertex id provider- Returns:
- the vertex id provider
-
setVertexIDProvider
public void setVertexIDProvider(ComponentNameProvider<V> vertexIDProvider)
Deprecated.Set the vertex id provider- Parameters:
vertexIDProvider
- the new vertex id provider. Must not be null.
-
getEdgeIDProvider
public ComponentNameProvider<E> getEdgeIDProvider()
Deprecated.Get the edge id provider- Returns:
- The edge provider
-
setEdgeIDProvider
public void setEdgeIDProvider(ComponentNameProvider<E> edgeIDProvider)
Deprecated.Set the edge id provider.- Parameters:
edgeIDProvider
- the new edge id provider. Must not be null.
-
-