Sha256: 552f82d07e012ed25b0e21bea5e8b2891d592431a0620d5dc9c2d114cff0b78c

Contents?: true

Size: 669 Bytes

Versions: 39

Compression:

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

39 entries across 39 versions & 1 rubygems

Version Path
y_petri-2.1.33 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.31 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.30 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.26 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.25 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.24 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.22 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.21 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.20 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.18 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.17 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.16 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.12 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.11 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.10 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.9 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.7 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.6 lib/y_petri/simulation/transition_representation/Ts.rb
y_petri-2.1.3 lib/y_petri/simulation/transition_representation/Ts.rb