Package org.tweetyproject.graphs
Class WeightedDirectedEdge<S extends Node,T extends Number>
java.lang.Object
org.tweetyproject.graphs.GeneralEdge<T>
org.tweetyproject.graphs.Edge<T>
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
ConstructorsConstructorDescriptionWeightedDirectedEdge(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
Creates a new weighted directed edge connecting two nodes with a given weight.- Parameters:
nodeA- the starting node of the edge.nodeB- the ending node of the edge.weight- the weight of the edge.
-
-
Method Details