lib/bayesnet/dsl.rb in bayesnet-0.0.3 vs lib/bayesnet/dsl.rb in bayesnet-0.1.0
- old
+ new
@@ -1,11 +1,15 @@
+# frozen_string_literal: true
+
require "bayesnet/graph"
module Bayesnet
+ # Bayesnet::DSL.define ...
module DSL
def define(&block)
graph = Graph.new
graph.instance_eval(&block) if block
+ graph.resolve_factors
graph
end
end
end