make matrix row iterator random access