from typing import List


def get_origin_position_factor(matrix: List[List[float]]):
    """
    Calculate average distance between stops.

    :matrix:       list of lists containing all to all distances

    return float
    """
    # NOTE: matrix is processed to integers for solver (d * 100)
    distance_factor = (sum(matrix[0]) / 100) / len(matrix[0][1:])

    return distance_factor