Class/Object

org.bitbucket.inkytonik.kiama.relation

Relation

Related Docs: object Relation | package relation

Permalink

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

Instance Constructors

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

    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.

  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?

  8. def domain: Vector[T]

    Permalink

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

    Permalink

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

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

    Permalink
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. lazy val inverse: Relation[U, 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.

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

    Permalink
  18. def isEmpty: Boolean

    Permalink

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

  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.

  24. def pairs: Vector[(T, U)]

    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.

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

    Permalink

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

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

    Permalink

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

  27. def range: Vector[U]

    Permalink

    The range of this relation.

  28. def size: Long

    Permalink

    The size of this relation.

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

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

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

    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.

  32. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped