Class: Bparity::Formal::InputGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/bparity/formal/bounded.rb

Instance Method Summary collapse

Constructor Details

#initialize(size:, depth:, observed: [], alphabet: %w[a b])) ⇒ InputGenerator

Returns a new instance of InputGenerator.



129
130
131
# File 'lib/bparity/formal/bounded.rb', line 129

def initialize(size:, depth:, observed: [], alphabet: %w[a b])
  @enumerator = ValueEnumerator.new(size:, depth:, observed:, alphabet:)
end

Instance Method Details

#values(type) ⇒ Object



133
134
135
# File 'lib/bparity/formal/bounded.rb', line 133

def values(type)
  (@enumerator.values(type) + boundaries(type)).uniq
end