Class: SparseMatrix::AbstractMatrix

Inherits:
Object
  • Object
show all
Defined in:
lib/sparse_matrix.rb

Direct Known Subclasses

DenseMatrix, SparseMatrix

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(r = 0, c = 0) ⇒ AbstractMatrix

Returns a new instance of AbstractMatrix.



6
7
8
9
# File 'lib/sparse_matrix.rb', line 6

def initialize(r=0,c=0)
    @row = r
    @column = c
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



11
12
13
# File 'lib/sparse_matrix.rb', line 11

def column
  @column
end

#rowObject

Returns the value of attribute row.



11
12
13
# File 'lib/sparse_matrix.rb', line 11

def row
  @row
end

Instance Method Details

#*(b) ⇒ Object



29
30
31
# File 'lib/sparse_matrix.rb', line 29

def *(b)

end

#+(b) ⇒ Object



25
26
27
# File 'lib/sparse_matrix.rb', line 25

def +(b)

end


21
22
23
# File 'lib/sparse_matrix.rb', line 21

def print_matrix

end

#read_matrixObject



13
14
15
# File 'lib/sparse_matrix.rb', line 13

def read_matrix

end

#to_sObject



17
18
19
# File 'lib/sparse_matrix.rb', line 17

def to_s

end