Class ZhangShashaTreeEditDistance.TreeOrdering.StackEntry

  • Enclosing class:
    ZhangShashaTreeEditDistance.TreeOrdering

    private class ZhangShashaTreeEditDistance.TreeOrdering.StackEntry
    extends java.lang.Object
    Auxiliary class which stores all needed variables to emulate recursive execution of DFS algorithm in computeKeyrootsAndMapping() method.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean isKeyroot
      Indites if v is a keyroot wrt tree.
      (package private) boolean isKeyrootArg
      Indicates if the next vertex returned by vChildIterator will be a keyroot.
      (package private) int lValue
      Value of the $l()$ function for v;
      (package private) int lVChild
      Value of $l()$ function for vChild.
      (package private) int state
      Auxiliary field which helps to identify which part of the recursive procedure should be executed next for this stack entry.
      (package private) V v
      A vertex from tree.
      (package private) V vChild
      Current child vertex of v.
      (package private) java.util.Iterator<V> vChildIterator
      Iterates over children of $v$ in tree.
      (package private) V vParent
      Parent vertex of v in tree or $null$ if v is root of tree.
    • Constructor Summary

      Constructors 
      Constructor Description
      StackEntry​(V v, boolean isKeyroot)
      Constructs an instance of the stack entry for the given v and isKeyroot
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • v

        V v
        A vertex from tree.
      • isKeyroot

        boolean isKeyroot
        Indites if v is a keyroot wrt tree.
      • vParent

        V vParent
        Parent vertex of v in tree or $null$ if v is root of tree.
      • isKeyrootArg

        boolean isKeyrootArg
        Indicates if the next vertex returned by vChildIterator will be a keyroot.
      • lValue

        int lValue
        Value of the $l()$ function for v;
      • vChildIterator

        java.util.Iterator<V> vChildIterator
        Iterates over children of $v$ in tree.
      • vChild

        V vChild
        Current child vertex of v.
      • lVChild

        int lVChild
        Value of $l()$ function for vChild.
      • state

        int state
        Auxiliary field which helps to identify which part of the recursive procedure should be executed next for this stack entry.
    • Constructor Detail

      • StackEntry

        public StackEntry​(V v,
                          boolean isKeyroot)
        Constructs an instance of the stack entry for the given v and isKeyroot
        Parameters:
        v - a vertex from tree
        isKeyroot - true iff v is a keyroot