Sha256: 9d94b224e3890169ee6327d8155aa9f79e34255a00e6a143068aa7b3faaca3f9

Contents?: true

Size: 670 Bytes

Versions: 17

Compression:

Stored size: 670 Bytes

Contents

# encoding: utf-8

# A mixin for Ts transition representations.
# 
class YPetri::Simulation::TransitionRepresentation
  module Type_Ts
    include Type_T
    include Type_s
    
    attr_reader :gradient_closure
    
    # Initialization subroutine.
    # 
    def init
      super
      @gradient_closure = to_gradient_closure
    end
    
    # Gradient contribution of the transition to all places.
    # 
    def ∇
      codomain >> gradient_closure.call
    end
    alias gradient_all ∇
    
    # Builds a gradient closure.
    # 
    def to_gradient_closure
      build_closure
    end
  end # Type_Ts
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/Ts.rb
y_petri-2.4.8 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.4.6 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.4.4 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.4.3 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.4.2 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.4.0 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.12 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.11 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.10 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.9 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.8 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.6 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.5 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.4 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.3 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.3.2 lib/y_petri/simulation/transition_representation/Ts.rb