Sha256: 376547cf38fb7dbc1652cd846bd79e77ffec708dd2be689ea6fd6b56504f96fb

Contents?: true

Size: 709 Bytes

Versions: 34

Compression:

Stored size: 709 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

34 entries across 34 versions & 1 rubygems

Version Path
y_petri-2.2.4 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.2.3 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.2.2 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.2.1 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.2.0 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.51 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.50 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.49 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.48 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.47 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.46 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.45 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.44 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.42 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.40 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.39 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.37 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.36 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.35 lib/y_petri/simulation/transition_representation/t.rb
y_petri-2.1.34 lib/y_petri/simulation/transition_representation/t.rb