1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/matrix.rb: removed compare_by*, inspect_org, cf [ruby-core:26268]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2010-04-01 18:01:45 +00:00
parent 99179d6322
commit 39aad8fa83

View file

@ -424,15 +424,6 @@ class Matrix
rows.eql? other.rows
end
def compare_by_row_vectors(rows, comparison = :==)
return false unless @rows.size == rows.size
@rows.size.times do |i|
return false unless @rows[i].send(comparison, rows[i])
end
true
end
#
# Returns a clone of the matrix, so that the contents of each do not reference
# identical objects.
@ -923,13 +914,11 @@ class Matrix
"Matrix.empty(#{row_size}, #{column_size})"
else
"Matrix[" + @rows.collect{|row|
"[" + row.collect{|e| e.to_s}.join(", ") + "]"
"[" + row.collect{|e| e.to_s}.join(", ") + "]"
}.join(", ")+"]"
end
end
alias_method :inspect_org, :inspect
#
# Overrides Object#inspect
#
@ -1193,10 +1182,6 @@ class Vector
@elements.eql? other.elements
end
def compare_by(elements, comparison = :==)
@elements.send(comparison, elements)
end
#
# Return a copy of the vector.
#