index(value, selector = :all) â [row, column]
index(selector = :all){ block } â [row, column]
index(selector = :all) â an_enumerator
index(selector = :all){ block } â [row, column]
index(selector = :all) â an_enumerator
Instance Public methods
The index method is specialized to return the index as [row, column] It
also accepts an optional selector
argument, see each for details.
1 2 | Matrix[ [ 1 , 2 ], [ 3 , 4 ] ].index(& :even ?) # => [0, 1] Matrix[ [ 1 , 1 ], [ 1 , 1 ] ].index( 1 , :strict_lower ) # => [1, 0] |
Please login to continue.