Module: YPetri::Simulation::TransitionRepresentation::Type_Ts

Includes:
Type_T, Type_s
Defined in:
lib/y_petri/simulation/transition_representation/Ts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Type_s

#S?, #build_closure, #s?

Methods included from Type_a

#A?, #a?, #delta

Methods included from Type_T

#T?, #d, #d_all, #delta, #g, #g_all, #gradient, #t?,

Instance Attribute Details

#gradient_closureObject (readonly)

Returns the value of attribute gradient_closure.



10
11
12
# File 'lib/y_petri/simulation/transition_representation/Ts.rb', line 10

def gradient_closure
  @gradient_closure
end

Instance Method Details

#initObject

Initialization subroutine.



14
15
16
17
# File 'lib/y_petri/simulation/transition_representation/Ts.rb', line 14

def init
  super
  @gradient_closure = to_gradient_closure
end

#to_gradient_closureObject

Builds a gradient closure.



28
29
30
# File 'lib/y_petri/simulation/transition_representation/Ts.rb', line 28

def to_gradient_closure
  build_closure
end

#Object Also known as: gradient_all

Gradient contribution of the transition to all places.



21
22
23
# File 'lib/y_petri/simulation/transition_representation/Ts.rb', line 21

def 
  codomain >> gradient_closure.call
end