static _computeIndexMapping(source, target) {
    //>>includeStart('debug', pragmas.debug);
    Check.defined("source", source);
    Check.defined("target", target);
    //>>includeEnd('debug');

    const result = [];
    const length = source.length;
    for (let i = 0; i < length; i++) {
      const element = source[i];
      const index = target.indexOf(element);
      result.push(index);
    }
    return result;
  }
Computes the index mapping from the given source to the given target.

The result will be an array that has the same length as the source,
and contains the indices that the source elements have in the
target array.

@param {object[]} source The source array
@param {object[]} target The target array
@returns {number[]} The result