Class: Gecode::Util::EnumMatrix

Inherits:
Matrix
  • Object
show all
Includes:
MatrixEnumMethods
Defined in:
lib/gecoder/interface/enum_matrix.rb

Overview

Extends Matrix so that it’s an enumerable.

Instance Method Summary collapse

Methods included from MatrixEnumMethods

#each

Instance Method Details

#column(i) ⇒ Object



26
27
28
# File 'lib/gecoder/interface/enum_matrix.rb', line 26

def column(i)
  wrap_if_wrapped make_vector_enumerable(super)
end

#minor(*args) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/gecoder/interface/enum_matrix.rb', line 30

def minor(*args)
  matrix = super
  class <<matrix
    include MatrixEnumMethods
  end
  return wrap_if_wrapped(matrix)
end

#row(i) ⇒ Object



22
23
24
# File 'lib/gecoder/interface/enum_matrix.rb', line 22

def row(i)
  wrap_if_wrapped make_vector_enumerable(super)
end