org.bitbucket.inkytonik.kiama.relation

Relation

class Relation[T, U] extends AnyRef

A binary relation between values of type T and values of type U. Constructed from memoised caches that map T values to their image and vice versa.

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

Instance Constructors

  1. new Relation(graph: Memoiser[T, Vector[U]] = ..., inverseGraph: Memoiser[U, 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[U]

    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.

  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?

  10. def domain: Vector[T]

    The domain of this 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[U]]

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

  16. val graph: Memoiser[T, Vector[U]]

  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. lazy val inverse: Relation[U, T]

    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.

  19. val inverseGraph: Memoiser[U, Vector[T]]

  20. def isEmpty: Boolean

    Is this relation empty (i.

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

  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, U)]

    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.

  27. def put(t: T, u: U): Unit

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

  28. def putAll(t: T, us: Vector[U]): Unit

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

  29. def range: Vector[U]

    The range of this relation.

  30. def size: Long

    The size of this relation.

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  32. def toString(): String

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

    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.

  34. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped