org.bitbucket.inkytonik.kiama.relation

TreeRelation

class TreeRelation[T <: Product] extends Relation[T, T]

A tree relation is a binary relation on tree nodes with an extra property that the image operation throws a NodeNotInTreeException exception if it is applied to a node that is not in this tree. T is the type of the tree nodes.

Self Type
TreeRelation[T]
Source
TreeRelation.scala
Linear Supertypes
Relation[T, T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TreeRelation
  2. Relation
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TreeRelation(tree: Tree[T, _ <: T], graph: Memoiser[T, Vector[T]] = ..., inverseGraph: Memoiser[T, Vector[T]] = ...)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(t: T): Vector[T]

    The image of a value of the relation's domain is a set of the values in the range that are related to that domain value.

    The image of a value of the relation's domain is a set of the values in the range that are related to that domain value.

    Definition Classes
    TreeRelationRelation
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def containsInDomain(t: T): Boolean

    Does the domain of this relation contain the value t?

    Does the domain of this relation contain the value t?

    Definition Classes
    Relation
  10. def domain: Vector[T]

    The domain of this relation.

    The domain of this relation.

    Definition Classes
    Relation
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def getGraph: Memoiser[T, Vector[T]]

    An accessor for the graph field for those rare cases where a client needs to get to it.

    An accessor for the graph field for those rare cases where a client needs to get to it.

    Definition Classes
    Relation
  16. val graph: Memoiser[T, Vector[T]]

    Definition Classes
    TreeRelationRelation
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. lazy val inverse: TreeRelation[T]

    Definition Classes
    TreeRelationRelation
  19. val inverseGraph: Memoiser[T, Vector[T]]

    Definition Classes
    TreeRelationRelation
  20. def isEmpty: Boolean

    Is this relation empty (i.

    Is this relation empty (i.e., contains no pairs)?

    Definition Classes
    Relation
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  25. object pair

    An auxiliary extractor for this relation that returns the matched value t and its image as a sequence.

  26. def pairs: Vector[(T, T)]

    Return pairs that describe the mappings in this relation.

    Return pairs that describe the mappings in this relation. I.e., the pair (t,u) will be included if t is related to u.

    Definition Classes
    Relation
  27. def put(t: T, u: T): Unit

    Add the pair (t,u) to the relation and the pair (u,t) to its inverse.

    Add the pair (t,u) to the relation and the pair (u,t) to its inverse.

    Definition Classes
    Relation
  28. def putAll(t: T, us: Vector[T]): Unit

    For each u taken from us add the pair (t,u) to the relation and the pair (u,t) to its inverse.

    For each u taken from us add the pair (t,u) to the relation and the pair (u,t) to its inverse.

    Definition Classes
    Relation
  29. def range: Vector[T]

    The range of this relation.

    The range of this relation.

    Definition Classes
    Relation
  30. def set(t: T, us: Vector[T]): Unit

    Set the image of the relation for t to us.

    Set the image of the relation for t to us. Takes care to make sure that all mentioned nodes are present in the graph and the inverse graph.

  31. def size: Long

    The size of this relation.

    The size of this relation.

    Definition Classes
    Relation
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    AnyRef → Any
  34. def unapplySeq(t: T): Option[Vector[T]]

    A relation can be used as an extractor that matches the image of the matched value t.

    A relation can be used as an extractor that matches the image of the matched value t. E.g., the pattern relation(a,b) succeeds if and only if the image of the matched value contains exactly two elements, which are then bound to a and b, respectively. Normal sequence matching works, such as case relation(a, _*) to match if there is at least one element in the image and bind the first element to a.

    Definition Classes
    Relation
  35. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Relation[T, T]

Inherited from AnyRef

Inherited from Any

Ungrouped