    # File lib/graphviz/math/matrix.rb, line 13
          def initialize( line_or_array, column = 0, val = 0 )
            if line_or_array.kind_of?(Array)
              line = line_or_array.size
              column = nil
              line_or_array.size.times do |l|
                unless line_or_array[l].kind_of?(Array)
                  raise ArgumentError, "Wrong matrix definition"
                end
                column = line_or_array[l].size if column.nil?
                unless line_or_array[l].size == column
                  raise ArgumentError, "Wrong matrix definition"
                end
                line_or_array[l].size.times do |c|
                  unless line_or_array[l][c].kind_of?(Numeric)
                    raise ValueError, "Element at [#{l+1}, #{c+1}] is not a number"
                  end
                end
              end

              @matrix = line_or_array
              @line = line
              @column = column
            elsif line_or_array.kind_of?(Integer) and column > 0
              @matrix = Array.new(line_or_array)
              @matrix.size.times do |l|
                @matrix[l] = Array.new(column)
                @matrix[l].size.times do |c|
                  @matrix[l][c] = val
                end
              end
              @line = line_or_array
              @column = column
            else
              raise ArgumentError, "Wrong matrix definition"
            end
          end