class Petri::Node

Public Instance Methods

identifier() click to toggle source

@return [String, nil]

# File lib/petri/node.rb, line 5
def identifier
  @data[:identifier]
end
ingoing_arcs() click to toggle source

@return [Array<Arc>]

# File lib/petri/node.rb, line 35
def ingoing_arcs
  net.arcs.select { |arc| arc.to_node == self }
end
input_arcs() click to toggle source

@return [Array<Arc>]

# File lib/petri/node.rb, line 10
def input_arcs
  net.arcs.select { |arc| arc.to_node == self && arc.regular? }
end
input_nodes() click to toggle source

@return [Array<Node>]

# File lib/petri/node.rb, line 15
def input_nodes
  input_arcs.map(&:from_node)
end
outgoing_arcs() click to toggle source

@return [Array<Arc>]

# File lib/petri/node.rb, line 30
def outgoing_arcs
  net.arcs.select { |arc| arc.from_node == self }
end
output_arcs() click to toggle source

@return [Array<Arc>]

# File lib/petri/node.rb, line 20
def output_arcs
  net.arcs.select { |arc| arc.from_node == self && arc.regular? }
end
output_nodes() click to toggle source

@return [Array<Node>]

# File lib/petri/node.rb, line 25
def output_nodes
  output_arcs.map(&:to_node)
end