code: public static ToLongFunction<IntTuple> asFunction(
          final LongArrayND array)
      {
          Objects.requireNonNull(array, "The array is null");
          return new ToLongFunction<IntTuple>()
          {
              @Override
              public long applyAsLong(IntTuple s)
              {
                  return array.get(s);
              }
          };
      }
docs: Returns a view on the given {@link LongArrayND} as a function
  that maps coordinates to array entry values. This function <b>may</b>
  throw an IndexOutOfBoundsException when the given indices are not
  valid. That is, if fromIndex &lt; 0 or toIndex &gt; size or
  fromIndex &gt; toIndex for any dimension. But explicit bounds
  checking is not guaranteed.
  
  @param array The array
  @return The function
  @throws NullPointerException If the given array is <code>null</code>