Sha256: 0e039da1c194ea21540b69d4cdbd6e178b0cf71784fa279b465b8446ad2a2881
Contents?: true
Size: 427 Bytes
Versions: 9
Compression:
Stored size: 427 Bytes
Contents
module Hilbert module Parser module MatrixParser include Base def execute(els, opts = { trans: false }) trans = opts[:trans] rows = els.first.split(/ *(?:;|\n) */).map(&:split_by_sp) rows.all? { |row| row.count == rows.first.count } if trans rows = rows.transpose end MatrixApi.execute(rows) end module_function :execute end end end
Version data entries
9 entries across 9 versions & 1 rubygems