package lab.components;
/**
* Created by Beruto on 28/10/17. Project -> AdrianProject
*/
public class Edge {
private Vertex v1;
private Vertex v2;
private int weight;
private boolean isDirected;
public Edge(Vertex v1, Vertex v2, int weight, boolean isDirected) {
this.v1 = v1;
this.v2 = v2;
this.weight = weight;
this.isDirected = isDirected;
}
public Vertex getV1() {
return v1;
}
public void setV1(Vertex v1) {
this.v1 = v1;
}
public Vertex getV2() {
return v2;
}
public void setV2(Vertex v2) {
this.v2 = v2;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public boolean isDirected() {
return isDirected;
}
}
Edge
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.