Class MatrixExporter<V,​E>

java.lang.Object
org.jgrapht.nio.BaseExporter<V,​E>
org.jgrapht.nio.matrix.MatrixExporter<V,​E>
Type Parameters:
V - the graph vertex type
E - the graph edge type
All Implemented Interfaces:
GraphExporter<V,​E>

public class MatrixExporter<V,​E>
extends BaseExporter<V,​E>
implements GraphExporter<V,​E>
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
  • Constructor Details

    • MatrixExporter

      public MatrixExporter()
      Creates a new MatrixExporter with integer name provider for the vertex identifiers and MatrixExporter.Format.SPARSE_ADJACENCY_MATRIX as the default format.
    • MatrixExporter

      public MatrixExporter​(MatrixExporter.Format format)
      Creates a new MatrixExporter with integer name provider for the vertex identifiers.
      Parameters:
      format - format to use
    • MatrixExporter

      public MatrixExporter​(MatrixExporter.Format format, java.util.function.Function<V,​java.lang.String> vertexIdProvider)
      Creates a new MatrixExporter.
      Parameters:
      format - format to use
      vertexIdProvider - for generating vertex identifiers. Must not be null.
  • Method Details