Module: Sbn

Defined in:
lib/sbn/combination.rb,
lib/sbn/net.rb,
lib/sbn/formats.rb,
lib/sbn/version.rb,
lib/sbn/learning.rb,
lib/sbn/variable.rb,
lib/sbn/inference.rb,
lib/sbn/string_variable.rb,
lib/sbn/numeric_variable.rb

Overview

combination.rb: Class for handling variable state combinations

Copyright © 2005-2007 Carl Youngblood [email protected]

Takes an array of arrays and iterates over all combinations of sub-elements. For example:

c = Sbn::Combination.new([[1, 2], [6, 7, 8]])
c.each {|comb| p comb }

Will produce:

[1, 6]
[1, 7]
[1, 8]
[2, 6]
[2, 7]
[2, 8]

Defined Under Namespace

Classes: Combination, Net, NumericVariable, StringCovariable, StringVariable, Variable

Constant Summary collapse

VERSION =
"0.9.1"