menpo/shape/graph.py
def relative_location_edge(self, parent, child):
        r"""
        Returns the relative location between the provided vertices. That is
        if vertex j is the parent and vertex i is its child and vector l
        denotes the coordinates of a vertex, then

        ::

            l_i - l_j = [[x_i], [y_i]] - [[x_j], [y_j]] =
                      = [[x_i - x_j], [y_i - y_j]]

        Parameters
        ----------
        parent : `int`
            The first selected vertex which is considered as the parent.
        child : `int`
            The second selected vertex which is considered as the child.

        Returns
        -------
        relative_location : ``(2,)`` `ndarray`
            The relative location vector.

        Raises
        ------
        ValueError
            Vertices ``parent`` and ``child`` are not connected with an edge.
        """
        if not self.is_edge(parent, child):
            raise ValueError('Vertices {} and {} are not connected '
                             'with an edge.'.format(parent, child))
        return self.points[child, ...] - self.points[parent, ...]
r"""
        Returns the relative location between the provided vertices. That is
        if vertex j is the parent and vertex i is its child and vector l
        denotes the coordinates of a vertex, then

        ::

            l_i - l_j = [[x_i], [y_i]] - [[x_j], [y_j]] =
                      = [[x_i - x_j], [y_i - y_j]]

        Parameters
        ----------
        parent : `int`
            The first selected vertex which is considered as the parent.
        child : `int`
            The second selected vertex which is considered as the child.

        Returns
        -------
        relative_location : ``(2,)`` `ndarray`
            The relative location vector.

        Raises
        ------
        ValueError
            Vertices ``parent`` and ``child`` are not connected with an edge.
        
r"""
Returns the relative location between the provided vertices. That is
if vertex j is the parent and vertex i is its child and vector l
denotes the coordinates of a vertex, then
r " " " Returns the relative location between the provided vertices . That is if vertex j is the parent and vertex i is its child and vector l denotes the coordinates of a vertex then
def relative_location_edge(self, parent, child):
        if not self.is_edge(parent, child):
            raise ValueError('Vertices {} and {} are not connected '
                             'with an edge.'.format(parent, child))
        return self.points[child, ...] - self.points[parent, ...]
def relative_location_edge ( self , parent , child ) : if not self . is_edge ( parent , child ) : raise ValueError ( 'Vertices {} and {} are not connected ' 'with an edge.' . format ( parent , child ) ) return self . points [ child , ... ] - self . points [ parent , ... ]
r"""
Returns the relative location between the provided vertices.
r " " " Returns the relative location between the provided vertices .
r"""
        Returns the relative location between the provided vertices. That is
        if vertex j is the parent and vertex i is its child and vector l
        denotes the coordinates of a vertex, then

        ::

            l_i - l_j = [[x_i], [y_i]] - [[x_j], [y_j]] =
                      = [[x_i - x_j], [y_i - y_j]]

        Parameters
        ----------
        parent : `int`
            The first selected vertex which is considered as the parent.
        child : `int`
            The second selected vertex which is considered as the child.

        Returns
        -------
        relative_location : ``(2,)`` `ndarray`
            The relative location vector.

        Raises
        ------
        ValueError
            Vertices ``parent`` and ``child`` are not connected with an edge.
        """
self
parent
child
l_i
`int`
The first selected vertex which is considered as the parent.
child : `int`
The second selected vertex which is considered as the child.

Returns

relative_location : ``(2,)`` `ndarray`
The relative location vector.

Raises

ValueError
Vertices ``parent`` and ``child`` are not connected with an edge.
` int ` The first selected vertex which is considered as the parent . child : ` int ` The second selected vertex which is considered as the child . Returns relative_location : ` ` ( 2 ) ` ` ` ndarray ` The relative location vector . Raises ValueError Vertices ` ` parent ` ` and ` ` child ` ` are not connected with an edge .