Module: Combinatorics

Defined in:
lib/combinatorics/version.rb,
lib/combinatorics/generator.rb,
lib/combinatorics/enumerator.rb,
lib/combinatorics/choose/mixin.rb,
lib/combinatorics/derange/mixin.rb,
lib/combinatorics/permute/mixin.rb,
lib/combinatorics/power_set/mixin.rb,
lib/combinatorics/choose/cardinality.rb,
lib/combinatorics/derange/cardinality.rb,
lib/combinatorics/permute/cardinality.rb,
lib/combinatorics/power_set/cardinality.rb,
lib/combinatorics/cartesian_product/mixin.rb,
lib/combinatorics/cartesian_product/cardinality.rb

Defined Under Namespace

Modules: CartesianProduct, Choose, Derange, Permute, PowerSet

Constant Summary collapse

VERSION =

Combinatorics module revision number

'0.5.0'
Generator =

auto-detects the Generator class.

if defined?(::Generator) # 1.8.7
  ::Generator
elsif defined?(::Enumerator::Generator) # >= 1.9.1
  ::Enumerator::Generator
else
  raise(NameError,"unable to find the Generator class")
end
Enumerator =

auto-detects the Enumerator class.

if defined?(::Enumerator) # 1.9
  ::Enumerator
elsif defined?(::Enumerable::Enumerator) # 1.8.7
  ::Enumerable::Enumerator
else
  raise("unable to find the Enumerator class")
end