Class: Array

Inherits:
Object show all
Defined in:
lib/matrice.rb

Instance Method Summary collapse

Instance Method Details

#to_matriceMatrice

Conversion d'un Array en une matrice

Returns:



283
284
285
286
287
288
289
290
291
# File 'lib/matrice.rb', line 283

def to_matrice
  if size > 0
    if self[0].class == Array
      Matrice.new( size, self[0].size, self )
    else
      Matrice.new( 1, size, [self])
    end
  end
end