Module: Prolly::RandVar::Entropy

Included in:
Prolly::RandVar
Defined in:
lib/prolly/rand_var/entropy.rb

Instance Method Summary collapse

Instance Method Details

#entropyObject

Entropy doesn’t take hashes (for now?) If it did, I’m not sure what H(color=green) means at all.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/prolly/rand_var/entropy.rb', line 8

def entropy
  if !@spec_rv.empty?
    raise "Cannot use entropy with specified random variables"
  else
    #puts "H(#{@rv} | #{@gv})"

    if @uspec_gv.empty?# and @spec_gv.empty?
      entropy_rv
    else 
      entropy_rv_gv
    end

  end
end