Class/Object

org.bitbucket.inkytonik.kiama.relation

Relation

Related Docs: object Relation | package relation

Permalink

class Relation[T, U] extends RelationLike[T, U, Relation]

A binary relation between values of type T and values of type U. Constructed from a vector of pairs that constitute the relation's graph.

Source
Relation.scala
Linear Supertypes
RelationLike[T, U, Relation], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Relation
  2. RelationLike
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Relation(graph: Vector[(T, U)])

    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

    Apply this relation (same as image).

    Apply this relation (same as image).

    Definition Classes
    RelationLike
  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 collect[V, W](f: ==>[(T, U), (V, W)]): Relation[V, W]

    Permalink

    Build a new relation by collecting pairs produced by the partial function f wherever it is defined on pairs of this relation.

    Build a new relation by collecting pairs produced by the partial function f wherever it is defined on pairs of this relation.

    Definition Classes
    RelationLike
  8. val companion: Relation.type

    Permalink

    A companion object that provides factory methods for this kind of relation.

    A companion object that provides factory methods for this kind of relation.

    Definition Classes
    RelationRelationLike
  9. def compose[S](st: RelationLike[S, T, Relation]): Relation[S, U]

    Permalink

    Compose this relation with st.

    Compose this relation with st.

    Definition Classes
    RelationLike
  10. 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
    RelationLike
  11. def containsInRange(u: U): Boolean

    Permalink

    Does the range of this relation contain the value u?

    Does the range of this relation contain the value u?

    Definition Classes
    RelationLike
  12. lazy val domain: Vector[T]

    Permalink

    The domain of this relation.

    The domain of this relation.

    Definition Classes
    RelationLike
  13. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. val graph: Vector[(T, U)]

    Permalink

    The graph of this relation.

    The graph of this relation.

    Definition Classes
    RelationRelationLike
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. def image(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.

    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
    RelationLike
  20. lazy val index: Relation[U, Int]

    Permalink

    A relation that maps each element of the range to its position (starting counting at zero).

    A relation that maps each element of the range to its position (starting counting at zero).

    Definition Classes
    RelationLike
  21. lazy val inverse: Relation[U, T]

    Permalink

    Invert this relation.

    Invert this relation. In other words, if (t,u) is in the relation, then (u,t) is in the inverted relation.

    Definition Classes
    RelationLike
  22. lazy val isEmpty: Boolean

    Permalink

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

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

    Definition Classes
    RelationLike
  23. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  27. object pair

    Permalink

    An auxiliary extractor for this relation that matches pairs.

    An auxiliary extractor for this relation that matches pairs. The match succeeds if and only if the matched value t has a unique image in the relation. Both t and its unique image value are returned for a successful match.

    Definition Classes
    RelationLike
  28. def preImage(u: U): Vector[T]

    Permalink

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

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

    Definition Classes
    RelationLike
  29. lazy val preIndex: Relation[T, Int]

    Permalink

    A relation that maps each element of the domain to its position starting at zero.

    A relation that maps each element of the domain to its position starting at zero.

    Definition Classes
    RelationLike
  30. lazy val projDomain: Relation[T, Vector[U]]

    Permalink

    Domain projection, i.e., form a relation that relates each value in the domain to all of the related values in the range.

    Domain projection, i.e., form a relation that relates each value in the domain to all of the related values in the range.

    Definition Classes
    RelationLike
  31. lazy val projRange: Relation[U, Vector[T]]

    Permalink

    Range projection, i.e., form a relation that relates each value in the range to all of the related values in the domain.

    Range projection, i.e., form a relation that relates each value in the range to all of the related values in the domain.

    Definition Classes
    RelationLike
  32. lazy val range: Vector[U]

    Permalink

    The range of this relation.

    The range of this relation.

    Definition Classes
    RelationLike
  33. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  35. def unapply(t: T): Option[U]

    Permalink

    A relation can be used as an extractor that matches if and only if the matched value t has a unique image in the relation.

    A relation can be used as an extractor that matches if and only if the matched value t has a unique image in the relation. The unique image value is returned for a successful match.

    Definition Classes
    RelationLike
  36. def unapplySeq(t: T): Option[Vector[U]]

    Permalink

    A relation can be used as an extractor that returns the image for a given domain value t.

    A relation can be used as an extractor that returns the image for a given domain value t. Fails if t is not in the domain.

    Definition Classes
    RelationLike
  37. def union(r: RelationLike[T, U, Relation]): Relation[T, U]

    Permalink

    Union this relation with r.

    Union this relation with r.

    Definition Classes
    RelationLike
  38. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. def withDomain(t: T): Relation[T, U]

    Permalink

    Return the sub-relation of this relation that contains just those pairs that have t as their domain element.

    Return the sub-relation of this relation that contains just those pairs that have t as their domain element.

    Definition Classes
    RelationLike
  42. def withRange(u: U): Relation[T, U]

    Permalink

    Return the sub-relation of this relation that contains just those pairs that have u as their range element.

    Return the sub-relation of this relation that contains just those pairs that have u as their range element.

    Definition Classes
    RelationLike

Inherited from RelationLike[T, U, Relation]

Inherited from AnyRef

Inherited from Any

Ungrouped