Package smile.graph
Class Graph.Edge
java.lang.Object
smile.graph.Graph.Edge
- Enclosing interface:
Graph
Graph edge.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
v1
public final int v1The id of one vertex connected by this edge. For directed graph, this is the tail of arc. -
v2
public final int v2The id of the other vertex connected by this edge. For directed graph, this is the head of arc. -
weight
public double weightThe weight of edge. For unweighted graph, this is always 1.
-
-
Constructor Details
-
Edge
public Edge(int v1, int v2, double weight) Constructor.- Parameters:
v1
- the vertex id.v2
- the other vertex id.weight
- the weight of edge.
-