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>
public final class GraphMlGraphWriter<V,E> extends Object
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 typeboolean
,int
,long
,float
,double
orString
, and a default value for each weight type.The GraphML format support both self edges and parallel edges.
- Author:
- Barak Ugav
- See Also:
GraphMlGraphReader
-
-
Constructor Summary
Constructors Constructor Description GraphMlGraphWriter()
Create a new writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Method Detail
-
writeGraph
public final void writeGraph(Graph<V,E> graph, Writer writer)
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
-
-