Class AbstractPath<N,​E>

  • Type Parameters:
    N - Тип вершины
    E - Тип ребра
    All Implemented Interfaces:
    Path<N,​E>
    Direct Known Subclasses:
    BasicPath

    public abstract class AbstractPath<N,​E>
    extends Object
    implements Path<N,​E>
    Путь в графе
    Author:
    gocha
    • Field Detail

      • direction

        protected Path.Direction direction
        Описывает направление движения
    • Constructor Detail

      • AbstractPath

        public AbstractPath()
    • Method Detail

      • clone

        public abstract Path<N,​E> clone()
        Description copied from interface: Path
        Создание клона
        Specified by:
        clone in interface Path<N,​E>
        Overrides:
        clone in class Object
        Returns:
        клон
      • edge

        public E edge​(int beginIndex,
                      int endIndex)
        Description copied from interface: Path
        Получение ребра между указаными вершинами. Растояние между вершинами, должно быть 1 ребро.
        Specified by:
        edge in interface Path<N,​E>
        Parameters:
        beginIndex - начальная вершина
        endIndex - конечная (исключительно) вершина
        Returns:
        ребро
      • segment

        public Path<N,​E> segment​(int beginIdx,
                                       int endExc)
        Description copied from interface: Path
        Возвращает под путь
        Specified by:
        segment in interface Path<N,​E>
        Parameters:
        beginIdx - начальная вершина
        endExc - конечная (исключительно) вершина
        Returns:
        Под путь
      • cycles

        public List<Path<N,​E>> cycles()
        Description copied from interface: Path
        Возвращает циклы в пути
        Specified by:
        cycles in interface Path<N,​E>
        Returns:
        список циклов