(self, indices: Tuple, distance_matrix: np.ndarray)
return dist
Calculate combinatorial distance between a select group of
        trajectories, indicated by indices

        Parameters
        ----------
        indices : tuple
        distance_matrix : numpy.ndarray (M,M)

        Returns
        -------
        numpy.ndarray

        Notes
        -----
        This function can perhaps be quickened by calculating the sum of the
        distances. The calculated distances, as they are right now,
        are only used in a relative way. Purely summing distances would lead
        to the same result, at a perhaps quicker rate.
Calculate combinatorial distance between a select group of
        trajectories, indicated by indices
Calculate combinatorial distance between a select group of trajectories indicated by indices
def sum_distances(self, indices: Tuple, distance_matrix: np.ndarray) -> np.ndarray:
        """Calculate combinatorial distance between a select group of
        trajectories, indicated by indices

        Parameters
        ----------
        indices : tuple
        distance_matrix : numpy.ndarray (M,M)

        Returns
        -------
        numpy.ndarray

        Notes
        -----
        This function can perhaps be quickened by calculating the sum of the
        distances. The calculated distances, as they are right now,
        are only used in a relative way. Purely summing distances would lead
        to the same result, at a perhaps quicker rate.
        """
        combs_tup = combinations(indices, 2)

        combs = np.array(tuple(zip(*combs_tup)))

        # Calculate distance (vectorized)
        dist = np.sqrt(
            np.sum(np.square(distance_matrix[combs[0], combs[1]]), axis=0))

        return dist
def sum_distances ( self , indices : Tuple , distance_matrix : np . ndarray ) -> np . ndarray : combs_tup = combinations ( indices , 2 ) combs = np . array ( tuple ( zip ( * combs_tup ) ) ) # Calculate distance (vectorized) dist = np . sqrt ( np . sum ( np . square ( distance_matrix [ combs [ 0 ] , combs [ 1 ] ] ) , axis = 0 ) ) return dist