Class/Object

org.bitbucket.inkytonik.kiama.relation

TreeRelation

Related Docs: object TreeRelation | package relation

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

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. def apply(t: T): Vector[T]

    Permalink

    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
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

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

    Permalink

    Does the domain of this relation contain the value t?

    Does the domain of this relation contain the value t?

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

    Permalink

    The domain of this relation.

    The domain of this relation.

    Definition Classes
    Relation
  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. final def getClass(): Class[_]

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

    Permalink

    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
  14. val graph: Memoiser[T, Vector[T]]

    Permalink
    Definition Classes
    TreeRelationRelation
  15. def hashCode(): Int

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

    Permalink

    Return a relation that is the inverse of this one.

    Return a relation that is the inverse of this one. In other words, if (t,u) is in the relation, then (u,t) is in the inverted relation.

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

    Permalink
    Definition Classes
    TreeRelationRelation
  18. def isEmpty: Boolean

    Permalink

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  23. object pair

    Permalink

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

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

    Definition Classes
    Relation
  24. def pairs: Vector[(T, T)]

    Permalink

    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
  25. def put(t: T, u: T): Unit

    Permalink

    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
  26. def putAll(t: T, us: Vector[T]): Unit

    Permalink

    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
  27. def range: Vector[T]

    Permalink

    The range of this relation.

    The range of this relation.

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

    Permalink

    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.

  29. def size: Long

    Permalink

    The size of this relation.

    The size of this relation.

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

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

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

    Permalink

    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
  33. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Relation[T, T]

Inherited from AnyRef

Inherited from Any

Ungrouped