Module: Stamina::Dsl::RegLang
- Included in:
- Stamina::Dsl
- Defined in:
- lib/stamina-induction/stamina/dsl/reg_lang.rb
Constant Summary collapse
Instance Method Summary collapse
-
#characteristic_sample(arg) ⇒ Object
Extracts a characteristic sample for a regular language (coerced from
arg) as a Sample instance. -
#hide(arg, alph) ⇒ Object
Hides
alphsymbols in the regular languagearg. -
#kernel(arg) ⇒ Object
Extracts the kernel of a regular language (coerced from
arg) as a Sample instance. -
#prefix_closed(arg) ⇒ Object
Coerces
argto a prefix-closed regular language. -
#project(arg, alph) ⇒ Object
Hides allbut
alphsymbols in the regular languagearg. -
#regular(arg) ⇒ Object
Coerces
argto a regular language. -
#short_prefixes(arg) ⇒ Object
Extracts the short prefixes of a regular language (coerced from
arg) as a Sample instance. -
#sigma_star(alphabet) ⇒ Object
Returns the universal language on a given alphabet.
Instance Method Details
#characteristic_sample(arg) ⇒ Object
Extracts a characteristic sample for a regular language (coerced from
arg) as a Sample instance.
48 49 50 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 48 def characteristic_sample(arg) regular(arg).characteristic_sample end |
#hide(arg, alph) ⇒ Object
Hides alph symbols in the regular language arg
62 63 64 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 62 def hide(arg, alph) regular(arg).hide(alph) end |
#kernel(arg) ⇒ Object
Extracts the kernel of a regular language (coerced from arg) as
a Sample instance.
40 41 42 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 40 def kernel(arg) regular(arg).kernel end |
#prefix_closed(arg) ⇒ Object
Coerces arg to a prefix-closed regular language.
24 25 26 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 24 def prefix_closed(arg) regular(arg).prefix_closed end |
#project(arg, alph) ⇒ Object
Hides allbut alph symbols in the regular language arg
55 56 57 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 55 def project(arg, alph) regular(arg).project(alph) end |
#regular(arg) ⇒ Object
Coerces arg to a regular language.
10 11 12 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 10 def regular(arg) Stamina::RegLang.coerce(arg) end |
#short_prefixes(arg) ⇒ Object
Extracts the short prefixes of a regular language (coerced from arg)
as a Sample instance.
32 33 34 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 32 def short_prefixes(arg) regular(arg).short_prefixes end |
#sigma_star(alphabet) ⇒ Object
Returns the universal language on a given alphabet.
17 18 19 |
# File 'lib/stamina-induction/stamina/dsl/reg_lang.rb', line 17 def sigma_star(alphabet) Stamina::RegLang.sigma_star(alphabet) end |