make Vertex serializable

This commit is contained in:
2022-02-26 07:45:36 -06:00
parent 7b03a3cce8
commit ab437512e9
2 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ public class GraphMLFileWriter {
GraphMLExporter<Vertex, SimpleWeightedGraph<Vertex, DefaultWeightedEdge>> exporter = new GraphMLExporter<>(Vertex::getVertexLabel);
//set to export weights
exporter.setExportEdgeWeights(true);
//set type, sequnce, and occupancy attributes for each vertex
//set type, sequence, and occupancy attributes for each vertex
exporter.setVertexAttributeProvider( v -> {
Map<String, Attribute> attributes = new HashMap<>();
attributes.put("type", DefaultAttribute.createAttribute(v.getType()));

View File

@@ -1,6 +1,6 @@
import java.io.Serializable;
public class Vertex {
public class Vertex implements Serializable {
private SequenceType type;
private Integer vertexLabel;
private Integer sequence;