# File lib/bn4r/bn.rb, line 209 def get_probability(node_assignment = value, givens_assignments = parents_assignments) # raise "Node must have a value and a givens_assignments, otherwise put" # + "them in function call" if node_assignment.nil? or givens_assignments.nil? # if there's a cached table take the index return @table[get_table_index(node_assignment, givens_assignments)] if @table_is_a_proc.nil? or !@table_is_a_proc # if the value is calculated on the fly using a function instead of # a table return @table[node_assignment, givens_assignments] end