Class Vertex
java.lang.Object
org.unifi.mecvirtualresourceallocation.graph.Vertex
This class represents a vertex in a hypergraph or in a conflict graph. Each vertex is
characterized by a unique identifier and a weight. The identifier is used to distinguish between
different vertices, while the weight represents the energy consumption.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new vertex with the specified identifier and weight.Vertex
(String id, BigDecimal weight) Constructs a new vertex with the specified identifier and weight. -
Method Summary
-
Constructor Details
-
Vertex
Constructs a new vertex with the specified identifier and weight.- Parameters:
id
- the unique identifier of the vertexweight
- the weight associated with the vertex
-
Vertex
Constructs a new vertex with the specified identifier and weight.- Parameters:
id
- the unique identifier of the vertexweight
- the weight associated with the vertex
-
-
Method Details
-
getId
Returns the identifier of this vertex.- Returns:
- the identifier of the vertex
-
setId
Sets the identifier of this vertex.- Parameters:
id
- the new identifier of the vertex
-
getWeight
Returns the weight of this vertex.- Returns:
- the weight of the vertex
-
getNegativeWeight
Returns the negative weight of this vertex.- Returns:
- the negative weight of the vertex
-
toString
Returns a string representation of the vertex. The string representation consists of the vertex's identifier and weight, enclosed in curly braces. -
equals
-
hashCode
public int hashCode()
-