Package edu.cmu.tetrad.search.utils
Class R5R9Dijkstra.DijkstraEdge
java.lang.Object
edu.cmu.tetrad.search.utils.R5R9Dijkstra.DijkstraEdge
- Enclosing class:
R5R9Dijkstra
Represents a node in Dijkstra's algorithm. The weight of the edge from the start is stored in the distance field
and is modified by the algorithm.
-
Constructor Summary
ConstructorsConstructorDescriptionDijkstraEdge
(Node y, int weight) Represents an edge connecting two nodes in Dijkstra's algorithm. -
Method Summary
-
Constructor Details
-
DijkstraEdge
Represents an edge connecting two nodes in Dijkstra's algorithm. The edge has a weight that represents the cost of traversing from one node to another.Immutable.
- Parameters:
y
- the to-node.weight
- the weight of the edge.
-
-
Method Details
-
getToNode
-
getWeight
public int getWeight()Retrieves the weight of the edge represented by this DijkstraEdge.- Returns:
- the weight of the edge
-
toString
-