class Rley::GFG::Edge
Abstract class. Represents an edge in a grammar flow graph. Responsibilities:
-
To know the successor vertex
Attributes
@return [Vertex] The destination vertex of the edge .
Public Class Methods
Source
# File lib/rley/gfg/edge.rb, line 15 def initialize(thePredecessor, theSuccessor) @successor = theSuccessor thePredecessor&.add_edge(self) end
Construct a directed edge between two given vertices @param thePredecessor [Vertex] @param theSuccessor [Vertex]
Public Instance Methods
Source
# File lib/rley/gfg/edge.rb, line 28 def inspect to_s end
Returns a string containing a human-readable representation of the production. @return [String]
Source
# File lib/rley/gfg/edge.rb, line 21 def to_s " --> #{successor.label}" end
@return [String]