Class

gstlib.InnerTree

NonRootNode

Related Doc: package InnerTree

Permalink

sealed abstract class NonRootNode extends Node

Represents a non-root node in the tree that contains a label

A NonRootNode includes the edge-label compression schema representing a substring of a given sequence by a beginning and an end positions (inclusive).

Labels start from 1. For a sequence s of m elements, indexes range from 1 to m (inclusive).

A label can be specified only by its start index ('from') which means that it ranges from the 'from' index to the end of the current sequence.

Linear Supertypes
Node, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NonRootNode
  2. Node
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def add[Alphabet](child: NonRootNode, start: (NonRootNode) ⇒ Either[Alphabet, TerminalSymbol]): Unit

    Permalink
    Definition Classes
    Node
  2. abstract def childrenMap: Nodes

    Permalink
    Definition Classes
    Node
  3. abstract def from: Int

    Permalink
  4. abstract def from_=(from: Int): Unit

    Permalink
  5. abstract def parent: Node

    Permalink
  6. abstract def parent_=(n: Node): Unit

    Permalink
  7. abstract def remove[Alphabet](child: NonRootNode, start: (NonRootNode) ⇒ Either[Alphabet, TerminalSymbol]): Unit

    Permalink
    Definition Classes
    Node
  8. abstract def sequenceID: SequenceID

    Permalink
  9. abstract def sequenceID_=(id: SequenceID): Unit

    Permalink
  10. abstract def size(): Int

    Permalink
    Definition Classes
    Node
  11. abstract def suffix_link: Option[Node]

    Permalink
  12. abstract def to: Int

    Permalink
  13. abstract def to_=(to: Int): Unit

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def childStartingWith[Alphabet](item: Either[Alphabet, TerminalSymbol]): Option[NonRootNode]

    Permalink

    Computes the child node of this node which edge-label starts with the given item

    Computes the child node of this node which edge-label starts with the given item

    Definition Classes
    Node
  6. def children: List[NonRootNode]

    Permalink
    Definition Classes
    Node
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. var dfs: Int

    Permalink

    Depth-first number

    Depth-first number

    Definition Classes
    Node
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findPathEndContaining[Alphabet](s: Walkable[Either[Alphabet, TerminalSymbol]], startIndex: Int, endIndex: Int)(start: (NonRootNode) ⇒ Either[Alphabet, TerminalSymbol], getEdgeLabelItem: (NonRootNode, Int) ⇒ Either[Alphabet, TerminalSymbol], labelLength: (NonRootNode) ⇒ Int): Option[(NonRootNode, Int)]

    Permalink

    Finds the path end following a sequence (given as a global sequence, the starting and end indexes of the subsequence to search) from the root node if it exists

    Finds the path end following a sequence (given as a global sequence, the starting and end indexes of the subsequence to search) from the root node if it exists

    s

    the global sequence that contains the searched subsequence

    startIndex

    the start index in the global sequence of the first character of the searched subsequence

    endIndex

    the end index in the global sequence of the last character of the searched subsequence

    start

    a function that given a NonRootNode retrieves efficiently the first item of the edge-label conducting to the given node in the tree

    getEdgeLabelItem

    a function that retrieves efficiently the ith item in the edge label to the given node

    labelLength

    a function that given a NonRootNode computes the length of the edge-label conducting to this node in the tree

    returns

    an optional pair containing the NonRootNode which path-label includes the searched subsequence along with the number of item that are in the path-label and not in the searched subsequence (i.e., the gap between the end of the search subsequence in the path-label to reach the node)

    Definition Classes
    Node
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def has_suffix_link: Boolean

    Permalink
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def labelToString: String

    Permalink
  18. def leaves(): List[LeafNode]

    Permalink
    Definition Classes
    Node
  19. def leavesHelper(currentNode: Node): List[LeafNode]

    Permalink
    Attributes
    protected
    Definition Classes
    Node
  20. def length[Alphabet, Repr](getSequenceLength: (SequenceID) ⇒ Int, currentEnd: Option[Int] = None)(implicit arg0: (Repr) ⇒ Sequence[Alphabet]): Int

    Permalink

    Computes the length of this label

    Computes the length of this label

    currentEnd

    an option including the current index of the end of the sequence, or None if the full sequence should be considered

    returns

    the length of this label

  21. def mkString[Alphabet](label: (NonRootNode) ⇒ String, tabuling: String): String

    Permalink
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def parents(): List[NonRootNode]

    Permalink
    Definition Classes
    NonRootNodeNode
  26. final def parentsHelper(currentNode: Node, acc: List[NonRootNode]): List[NonRootNode]

    Permalink
    Attributes
    protected
    Annotations
    @tailrec()
  27. def pathLabel: List[NonRootNode]

    Permalink

    Computes the path label as a list of NonRootNode

    Computes the path label as a list of NonRootNode

    Beware, labels of these nodes might include special upper limits such as the END constant.

    Definition Classes
    NonRootNodeNode
  28. final def pathLabelHelper(currentNode: Node, acc: List[NonRootNode]): List[NonRootNode]

    Permalink
    Attributes
    protected
    Annotations
    @tailrec()
  29. def pathSingleLabel(getSequenceLengthBy: (SequenceID) ⇒ Int): List[SingleLabel]

    Permalink

    Computes the path label as a list of definitive labels given a function to get the length of a sequence from its ID

    Computes the path label as a list of definitive labels given a function to get the length of a sequence from its ID

    Definition Classes
    NonRootNodeNode
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toDefiniteLabel(getSequenceLength: (SequenceID) ⇒ Int): SingleLabel

    Permalink
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. def value[Alphabet, Repr](sliceSequenceBy: (SequenceID, Int, Int) ⇒ Repr, dropSequenceBy: (SequenceID, Int) ⇒ Repr, currentEnd: Option[Int] = None)(implicit arg0: (Repr) ⇒ Sequence[Alphabet]): Repr

    Permalink

    Computes the value of this label

    Computes the value of this label

    currentEnd

    optional end index (if the end is not the real end)

  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def walkDown[Alphabet](s: Walkable[Either[Alphabet, TerminalSymbol]], startIndex: Int, endIndex: Int, currentEnd: Int)(start: (NonRootNode) ⇒ Either[Alphabet, TerminalSymbol], labelLength: (NonRootNode) ⇒ Int): (NonRootNode, Int)

    Permalink

    Walks down from this node following the given sequence

    Walks down from this node following the given sequence

    s

    the searched sequence

    startIndex

    the first index of search in the sequence (inclusive)

    endIndex

    the last index of search in the sequence (inclusive)

    currentEnd

    current index of the end (i in suffix S[j..i] of phase i)

    start

    computes the first item of a label

    returns

    a pair (node, length) containing the node which path label contains sequence s, and the number of items left in the path to arrive to the node (0 means a perfect match)

    Definition Classes
    Node
    Note

    walkDown is overriden by 'NonRootNode'

  38. final def walkDownUntilUnmatch[Alphabet](s: Walkable[Either[Alphabet, TerminalSymbol]], startIndex: Int, endIndex: Int)(start: (NonRootNode) ⇒ Either[Alphabet, TerminalSymbol], getEdgeLabelItem: (NonRootNode, Int) ⇒ Either[Alphabet, TerminalSymbol], labelLength: (NonRootNode) ⇒ Int): Option[(NonRootNode, Int, Int)]

    Permalink

    Walks down the tree following the sequence until a mismatch occurs

    Walks down the tree following the sequence until a mismatch occurs

    It dissociates the following cases:

    1. the sequence is not in the tree, even partially (returns None) 2. the sequence is partially in the tree...
      1. ... and it stops on a non-root node (returns Some(node, int > 0, 0)) b. ... and it stops in a middle of an edge (returns Some(node, int > 0, int > 0)) 3. the sequence is entirely in the tree...
      2. ... and it stops on a non-root node (returns Some(node, 0, 0)) b. ... and it stops in a middle of an edge (returns Some(node, 0, int > 0))
    s

    the searched sequence

    startIndex

    the first index of search in the sequence (inclusive)

    endIndex

    the last index of search in the sequence (inclusive)

    start

    retrieves efficiently the first item in the edge label to the given node

    getEdgeLabelItem

    retrieves efficiently the ith item in the edge label to the given node

    labelLength

    computes efficiently the length of the edge label to the given node

    returns

    None if the sequence is not partially in the tree, else a triple containing 1) the non-root node at or below the unmatch or the end of the sequence happened, 2) the number of character left in the given sequence and 3) the number of character left to reach the non-root node (0 means "perfect match")

    Definition Classes
    NonRootNodeNode

Inherited from Node

Inherited from AnyRef

Inherited from Any

Ungrouped