class NMatrix
Public Instance Methods
investigate()
click to toggle source
Create a new square matrix of BigDecimal 0 objects @param [Fixnum] Number of rows and columns
def self.square(dimension) matrix = PlymptonMatrix.object(dimension, dimension) matrix.fill!(BigDecimal("0")) puts matrix.class() return(matrix) end
# File lib/plympton/matrix.rb, line 13 def investigate() dimensions = shape() rowDimension = dimensions[0] colDimension = dimensions[1] puts "" for row in 0...rowDimension for column in 0...colDimension print " %10f" % self[row, column].to_s('F') end puts"" end end