Sha256: 751b8ee7691c7c8b43d64692ead0e9673116333df18d122887c6fb2b284a67c5
Contents?: true
Size: 920 Bytes
Versions: 15
Compression:
Stored size: 920 Bytes
Contents
module Rley # This module is used as a namespace module GFG # This module is used as a namespace # Abstract class. Represents an edge in a grammar flow graph. # Responsibilities: # - To know the successor vertex class Edge # @return [Vertex] The destination vertex of the edge . attr_reader :successor # Construct a directed edge between two given vertices # @param thePredecessor [Vertex] # @param theSuccessor [Vertex] def initialize(thePredecessor, theSuccessor) @successor = theSuccessor thePredecessor.add_edge(self) end # @return [String] def to_s() " --> #{successor.label}" end # Returns a string containing a human-readable representation of the # production. # @return [String] def inspect() to_s end end # class end # module end # module # End of file
Version data entries
15 entries across 15 versions & 1 rubygems