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.
Author:
Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
See Also:
  • Constructor Details

  • Method Details

    • 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
      Overrides:
      isValid in class Walk
      Returns:
      True if valid, otherwise false.