Sort vertex lists by vertex label before making adjacency matrix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Vertex implements Serializable {
|
||||
public class Vertex implements Serializable, Comparable<Vertex> {
|
||||
private SequenceType type;
|
||||
private Integer vertexLabel;
|
||||
private Integer sequence;
|
||||
@@ -89,4 +89,9 @@ public class Vertex implements Serializable {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Vertex other) {
|
||||
return this.vertexLabel - other.getVertexLabel();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user