Package org.tweetyproject.graphs
Class WeightedDirectedEdge<S extends Node,T extends Number>
java.lang.Object
org.tweetyproject.graphs.GeneralEdge<S>
org.tweetyproject.graphs.Edge<S>
org.tweetyproject.graphs.DirectedEdge<S>
org.tweetyproject.graphs.WeightedDirectedEdge<S,T>
- Type Parameters:
S
- the type of nodes connected by this edge, which must extend `Node`.T
- the type of the weight, which must extend `Number`.
- All Implemented Interfaces:
WeightedEdge<S,
T>
public class WeightedDirectedEdge<S extends Node,T extends Number>
extends DirectedEdge<S>
implements WeightedEdge<S,T>
The `WeightedDirectedEdge` class represents a directed edge between two nodes in a graph,
with an associated weight.
This class extends the `DirectedEdge` class and implements the `WeightedEdge` interface, providing support for weighted directed edges. The weight of the edge is of type `T`, which is constrained to be a subtype of `Number`, allowing for numeric weights such as integers, floats, or doubles.
- Author:
- Lars Bengel, Sebastian Franke
-
Constructor Summary
ConstructorDescriptionWeightedDirectedEdge
(S nodeA, S nodeB, T weight) Creates a new weighted directed edge connecting two nodes with a given weight. -
Method Summary
Methods inherited from class org.tweetyproject.graphs.DirectedEdge
toString
-
Constructor Details
-
WeightedDirectedEdge
-
-
Method Details
-
getWeight
-
setWeight
Sets the weight of this edge to the specified value.- Parameters:
number
- the new weight of the edge.
-