def compute_adjacency_matrix(self, copy=False, **kwargs):
        if self.X is None:
            raise ValueError(distance_error_msg)

        kwds = self.adjacency_kwds.copy()
        kwds.update(kwargs)
        self.adjacency_matrix = compute_adjacency_matrix(self.X,
                                                         self.adjacency_method,
                                                         **kwds)
        if copy:
            return self.adjacency_matrix.copy()
        else:
            return self.adjacency_matrix
This function will compute the adjacency matrix.
dataset/ETHPy150Open mmp2/megaman/megaman/geometry/geometry.py/Geometry.compute_adjacency_matrix