Relation

onera.pmlanalyzer.pml.model.relations.Relation
See theRelation companion object
abstract class Relation[L, R](iniValues: Map[L, Set[R]])(using n: Name)

Relation between two finite sets Warning each one of the set contains the empty set value thus R(a) = \emptyset not imply that a \notin R

Attributes

L

type of the left set

R

type of the right set

iniValues

initial values of the relation

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Concrete methods

def add(a: L, b: R): Unit

Add the element b to a

Add the element b to a

Attributes

a

the input element

b

the new element

def add(a: L, b: Iterable[R]): Unit

Add a collection of b elements to a Warning if the b is empty then all the element linked to a are removed (STRANGE)

Add a collection of b elements to a Warning if the b is empty then all the element linked to a are removed (STRANGE)

Attributes

a

the input element

b

the collection of new elements

def apply(a: L): Set[R]

Provide the elements in relation with a WARNING the function returns an empty set either if a is not in the relation or if no elements are associated to a

Provide the elements in relation with a WARNING the function returns an empty set either if a is not in the relation or if no elements are associated to a

Attributes

a

the input element

Returns:

the set of related elements

def domain: Set[L]

Provide the set of all input elements

Provide the set of all input elements

Attributes

Returns:

the set of input elements

def edges: Map[L, Set[R]]

Provide the relation a map of edges

Provide the relation a map of edges

Attributes

Returns:

the map of edges

def get(a: L): Option[Set[R]]

Provide the elements in relation with a id a is in the relation

Provide the elements in relation with a id a is in the relation

Attributes

a

the input element

Returns:

the optional set of related elements

def inverse(b: R): Set[L]

Provide the elements a in relation with b

Provide the elements a in relation with b

Attributes

b

the output element

Returns:

the set of related inputs

def remove(a: L, b: R): Unit

Remove the element b from the relation with a

Remove the element b from the relation with a

Attributes

a

the input element

b

the removed element

def remove(a: L, b: Iterable[R]): Unit

Remove the elements of the collection b from the relation with a

Remove the elements of the collection b from the relation with a

Attributes

a

the input element

b

the removed elements

def remove(a: L): Unit

Remove a from the relation WARNING: this is different from removing all elements in relation with a

Remove a from the relation WARNING: this is different from removing all elements in relation with a

Attributes

a

the input element

def targetSet: Set[R]

Provide the set of all output elements

Provide the set of all output elements

Attributes

Returns:

the set of output elements

Concrete fields

val _inverse: HashMap[R, Set[L]]
val _values: HashMap[L, Set[R]]
val name: String