lib/generators.rb
def prime_rows(row)
    size = row.length
    size.times.collect {|i|
      interval = row[i]<row[0] ? (row[i]-row[0]) : (row[i]-row[0]-size)
      size.times.collect {|j|
        (row[j]-interval) % size
      }
    }
  end
# Creates tone matrix from the given row. Given row should be in a prime form and contain only unique integers
Creates tone matrix from the given row. Given row should be in a prime form and contain only unique integers
Creates tone matrix from the given row . Given row should be in a prime form and contain only unique integers
def prime_rows(row)
    size = row.length
    size.times.collect {|i|
      interval = row[i]<row[0] ? (row[i]-row[0]) : (row[i]-row[0]-size)
      size.times.collect {|j|
        (row[j]-interval) % size
      }
    }
  end
def prime_rows ( row ) size = row . length size . times . collect { | i | interval = row [ i ] < row [ 0 ] ? ( row [ i ] - row [ 0 ] ) : ( row [ i ] - row [ 0 ] - size ) size . times . collect { | j | ( row [ j ] - interval ) % size } } end
Creates tone matrix from the given row.
Creates tone matrix from the given row .
row