Class Path

  • All Implemented Interfaces:
    Serializable, Cloneable, Iterable<Node>, Collection<Node>, List<Node>, RandomAccess, NodeSequence

    public class Path
    extends Walk
    Represents a path in a graph. A path P is defined as a walk in which there are no node repetitions.
    Justin Deoliveira, Refractions Research Inc,
    See Also:
    Serialized Form
    • Constructor Detail

      • Path

        public Path()
      • Path

        public Path​(Collection<Node> nodes)
    • Method Detail

      • isValid

        public boolean isValid()
        Tests if the path is valid. A valid path satisfies two conditions:

        1. Each pair of adjacent nodes share an edge.
        2. There are no node repetitions.
        Specified by:
        isValid in interface NodeSequence
        isValid in class Walk
        True if valid, otherwise false.