Class AbstractPath<N,​E>

java.lang.Object
xyz.cofe.collection.graph.AbstractPath<N,​E>
Type Parameters:
N - Тип вершины
E - Тип ребра
All Implemented Interfaces:
Path<N,​E>
Direct Known Subclasses:
BasicPath

public abstract class AbstractPath<N,​E>
extends java.lang.Object
implements Path<N,​E>
Путь в графе
Author:
gocha
  • Nested Class Summary

    Nested classes/interfaces inherited from interface xyz.cofe.collection.graph.Path

    Path.Direction
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected Path.Direction direction
    Описывает направление движения
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractPath()  
    AbstractPath​(AbstractPath<N,​E> sample)  
  • Method Summary

    Modifier and Type Method Description
    abstract Path<N,​E> clone()
    Создание клона
    java.util.List<Path<N,​E>> cycles()
    Возвращает циклы в пути
    E edge​(int beginIndex, int endIndex)
    Получение ребра между указаными вершинами.
    Path<N,​E> segment​(int beginIdx, int endExc)
    Возвращает под путь

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface xyz.cofe.collection.graph.Path

    clear, count, edges, fetch, has, hasCycles, isEmpty, join, node, nodeCount, start
  • Field Details

  • Constructor Details

  • Method Details

    • clone

      public abstract Path<N,​E> clone()
      Description copied from interface: Path
      Создание клона
      Specified by:
      clone in interface Path<N,​E>
      Overrides:
      clone in class java.lang.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 java.util.List<Path<N,​E>> cycles()
      Description copied from interface: Path
      Возвращает циклы в пути
      Specified by:
      cycles in interface Path<N,​E>
      Returns:
      список циклов