public class Edge
extends java.lang.Object
| Constructor and Description |
|---|
Edge()
The constructor which initialize all the fields
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVariable(Variable variable)
When the weight is increase this method should be used in order to had the new variable in common in order to not add it a second times.
|
void |
calculateComplexity()
The Kruskal algorithm not always give a unique maximal weight spanning tree.
|
int |
getComplexity()
Getter of the complexity of the edge.
|
java.util.ArrayList<Variable> |
getListeVariables()
This method return the list off all the variables which are already linked
|
java.util.ArrayList<java.lang.String> |
getVariablesLabelInEdge()
This method is used for display purposes and return the list of the
variable in common by the two vertex of the edge with a string format.
|
Vertex |
getVertexA()
Return the first vertex linked
|
Vertex |
getVertexB()
Return the first vertex linked
|
int |
getWeight()
Getter on the field weight, which represent (in this case) the number of variables in common
between the two vertices linked
|
void |
setComplexity(int complexity)
Setter of the complexity of the edge.
|
void |
setListVariables(java.util.ArrayList<Variable> listeVariables)
Setter on the list of variables in common
|
void |
setVertexA(Vertex VertexA)
change one of the linked vertex
|
void |
setVertexB(Vertex VertexB)
change one of the linked vertex
|
void |
setWeight(int weight)
Setter of the weight
|
public int getWeight()
public void setWeight(int weight)
weight - the new weight of the edgepublic java.util.ArrayList<Variable> getListeVariables()
public void addVariable(Variable variable)
variable - The new variable in commonpublic void setListVariables(java.util.ArrayList<Variable> listeVariables)
listeVariables - the liste of variable in commonpublic Vertex getVertexA()
public void setVertexA(Vertex VertexA)
VertexA - the new linked vertexpublic Vertex getVertexB()
public void setVertexB(Vertex VertexB)
VertexB - the new linked vertexpublic int getComplexity()
public void setComplexity(int complexity)
complexity - the new complexity of the edgepublic java.util.ArrayList<java.lang.String> getVariablesLabelInEdge()
public void calculateComplexity()