public interface GraphEdgeI
This interface defines the fundamental contract for any object that acts as
an edge in a graph structure. Implementations of this interface are expected
to provide access to the two nodes
that this edge connects.
Edges are essential components of graphs, defining the relationships and pathways between nodes. While this base interface only mandates access to source and target nodes, implementations or sub-interfaces might extend this to include additional properties such as edge weight, type, capacity, or other attributes relevant to specific graph algorithms or models.
Modifier and Type | Method and Description |
---|---|
OnlyToDirectedGraphNodeI |
getFromNode()
Retrieves the source node from which this directed edge originates.
|
OnlyToDirectedGraphNodeI |
getToNode()
Retrieves the target node to which this directed edge points.
|
OnlyToDirectedGraphNodeI getFromNode()
This method is contractually obligated to return a non-null
OnlyToDirectedGraphNodeI
instance, as every valid edge must
have a defined starting point.
OnlyToDirectedGraphNodeI getToNode()
This method is contractually obligated to return a non-null
OnlyToDirectedGraphNodeI
instance, as every valid edge must
have a defined ending point.
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.