Package com.jgalgo.io
Class GraphMlGraphWriter<V,E>
java.lang.Object
com.jgalgo.io.GraphMlGraphWriter<V,E>
- Type Parameters:
V
- the vertices typeE
- the edges type
- All Implemented Interfaces:
GraphWriter<V,
E>
Write a graph in 'GraphML' format.
GraphML is an XML-based format for graphs. Both directed and undirected graphs are supported, along with mixed graphs
(some edges are directed while others are undirected) although the Graph
does not supported mixed graphs
(therefore the writer also doesn't support it). The format support graphs with vertices and edges of any type, as
long as they can be written as an XML attribute string. The format also support multiple weights for vertices and
edges, of type boolean
, int
, long
, float
, double
or String
, and a
default value for each weight type.
The GraphML format support both self edges and parallel edges.
- Author:
- Barak Ugav
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
writeGraph
(Graph<V, E> graph, Writer writer) Write a graph to an I/O writer.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jgalgo.io.GraphWriter
writeGraph, writeGraph
-
Constructor Details
-
GraphMlGraphWriter
public GraphMlGraphWriter()Create a new writer.
-
-
Method Details
-
writeGraph
Description copied from interface:GraphWriter
Write a graph to an I/O writer.- Specified by:
writeGraph
in interfaceGraphWriter<V,
E> - Parameters:
graph
- a graphwriter
- an I/O writer to which the graph description will be written to
-