def array_reverse_order_transform_next_index_to_current_index(frm, to, move):
    """Transforms frm and to depending on a move

    Works with the array_reverse_order move type.
    This function transforms the indices frm and to so that they can
    be used as indices in the unaltered array, yet return the value
    they would have had if the move was actually performed and they
    were used as indices.

    Parameters
    ----------
    frm : int
        The from index that one wants to use in the array if the move was
        performed.
    to : int
        The to index that one wants to use in the array if the move was
        performed.
    move : tuple of int
        A tuple with that represents a single, unique move.

    Returns
    -------
    frm : int
        The index in the unaltered array that has the same value as the
        parameter frm in an array where the move was performed.
    to : int
        The index in the unaltered array that has the same value as the
        parameter to in an array where the move was performed.

    Examples
    --------
    Some simple examples, the move remains the same, but the indices
    change:

    .. doctest::

        >>> from lclpy.evaluation.deltaeval.delta_tsp import \\
        ...     array_reverse_order_transform_next_index_to_current_index \\
        ...         as transform_next_index_to_current_index
        >>> transform_next_index_to_current_index(0, 10, (1, 8))
        (0, 10)
        >>> transform_next_index_to_current_index(0, 6, (1, 8))
        (0, 3)
        >>> transform_next_index_to_current_index(2, 3, (1, 8))
        (7, 6)
        >>> transform_next_index_to_current_index(1, 8, (1, 8))
        (8, 1)
        >>> transform_next_index_to_current_index(5, 10, (1, 8))
        (4, 10)


    """

    # check if the frm value is affected by the move
    if (frm >= move[0]) & (frm <= move[1]):

        # alter the value as necessary
        offset = frm - move[0]
        frm = move[1] - offset

    # check if the to value is affected by the move
    if (to >= move[0]) & (to <= move[1]):

        # alter the value as necessary
        offset = to - move[0]
        to = move[1] - offset

    return (frm, to)