Sha256: d1a4c794e74b7bb56aa7873e66ddb84d44d00cff7c2b0c2e0cd8d1eb8f8d9250

Contents?: true

Size: 710 Bytes

Versions: 17

Compression:

Stored size: 710 Bytes

Contents

# encoding: utf-8

# A mixin for timed transition representations.
# 
class YPetri::Simulation::TransitionRepresentation
  module Type_t
    include Type_a

    # False for timed transitions.
    # 
    def T?
      false
    end
    alias timed? T?

    # True for timed transitions.
    # 
    def t?
      true
    end
    alias timeless? t?

    # Initialization subroutine.
    # 
    def init
      super
      @function = source.action_closure
    end

    # Change, as it would happen if the transition fired, returned as hash
    # codomain places >> change.
    # 
    def d
      delta.with_keys do |p| p.name || p end
    end
  end # Type_t
end # class YPetri::Simulation::TransitionRepresentation

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
y_petri-2.4.9 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.4.8 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.4.6 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.4.4 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.4.3 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.4.2 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.4.0 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.12 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.11 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.10 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.9 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.8 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.6 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.5 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.4 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.3 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.3.2 lib/y_petri/simulation/transition_representation/t.rb