code: public static ToIntFunction<IntTuple> indexer(Order order, IntTuple size)
      {
          if (order == Order.COLEXICOGRAPHICAL)
          {
              return colexicographicalIndexer(size);
          }
          return lexicographicalIndexer(size);
      }
docs: Creates a function that maps multidimensional indices to 1D indices.
  The function will create consecutive 1D indices for indices that
  are given in the given {@link Order}. If the given {@link Order}
  is <code>null</code>, then an unspecified default order will be
  used.
  
  @param order The order for the indexing
  @param size The size of the array to index
  @return The indexer function
  @throws NullPointerException If the given size is <code>null</code>.