Method: TwoDMatrix#same_sublength
- Defined in:
- lib/csrmatrix.rb
#same_sublength(array) ⇒ Object
FIXME: Could be a contract in itself Contract :ArrayOf[C::ArrayOf] => C::Bool #Causes Invariant issues
333 334 335 336 337 338 339 340 341 342 |
# File 'lib/csrmatrix.rb', line 333 def same_sublength(array) # ensures that all sub arrays have the same length testLength = array[0].length array.each do || if(.length != testLength) return false end end return true end |