Class: Stamina::RegLang::CanonicalInfo::ShortPrefixes
- Inherits:
-
Utils::Decorate
- Object
- Utils::Decorate
- Stamina::RegLang::CanonicalInfo::ShortPrefixes
- Defined in:
- lib/stamina-induction/stamina/reg_lang/canonical_info.rb
Instance Method Summary collapse
- #init_deco(s) ⇒ Object
- #propagate(deco, edge) ⇒ Object
- #suppremum(d0, d1) ⇒ Object
- #take_at_start?(s) ⇒ Boolean
Instance Method Details
#init_deco(s) ⇒ Object
16 17 18 |
# File 'lib/stamina-induction/stamina/reg_lang/canonical_info.rb', line 16 def init_deco(s) s.initial? ? [] : nil end |
#propagate(deco, edge) ⇒ Object
13 14 15 |
# File 'lib/stamina-induction/stamina/reg_lang/canonical_info.rb', line 13 def propagate(deco, edge) deco.dup << edge.symbol end |
#suppremum(d0, d1) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/stamina-induction/stamina/reg_lang/canonical_info.rb', line 6 def suppremum(d0, d1) if (d0.nil? || d1.nil?) (d0 || d1) else (d0.size <= d1.size) ? d0 : d1 end end |
#take_at_start?(s) ⇒ Boolean
19 20 21 |
# File 'lib/stamina-induction/stamina/reg_lang/canonical_info.rb', line 19 def take_at_start?(s) s.initial? end |