T - The type of the events. Edges of the graph are labelled
with eventspublic class Edge<T extends Event>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_destination
The ID of the vertex in the graph that is the destination of this edge
|
protected T |
m_label
The label attached to this edge
|
protected int |
m_source
The ID of the vertex in the graph that is the destination of this edge
|
protected float |
m_weight
A weight associated to the edge.
|
| Constructor and Description |
|---|
Edge(int source,
T label,
int destination)
Creates an edge
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
getDestination()
Gets the ID of the destination vertex for that edge
|
T |
getLabel()
Gets the label of the edge
|
int |
getSource()
Gets the ID of the source vertex for that edge
|
float |
getWeight()
Gets the edge's weight
|
int |
hashCode() |
void |
setWeight(float weight)
Sets the edge's weight
|
java.lang.String |
toString() |
protected final int m_source
protected final int m_destination
protected float m_weight
public Edge(int source,
T label,
int destination)
label - The label attached to this edgedestination - The ID of the vertex in the graph that is the
destination of this edgepublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic T getLabel()
public int getDestination()
public int getSource()
public float getWeight()
public void setWeight(float weight)
weight - The weightCopyright © Sylvain HallĂ©. All Rights Reserved.