Class/Object

com.cra.figaro.language

Universe

Related Docs: object Universe | package language

Permalink

class Universe extends ElementCollection

A universe is a collection of elements that can be used by a reasoning algorithm.

Ordinarily, the arguments of elements in a universe must also belong to the universe. You can optionally supply a list of parent elements that contains other elements that can be arguments.

Linear Supertypes
ElementCollection, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Universe
  2. ElementCollection
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Universe(parentElements: List[Element[_]] = List())

    Permalink

    parentElements

    The parent elements on which this universe depends.

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 activeElements: List[Element[_]]

    Permalink

    The active elements in the universe.

  5. def add[T](element: Element[T]): Unit

    Permalink

    Add an element to the element collection.

    Add an element to the element collection.

    Definition Classes
    ElementCollection
  6. def allPossibleResolutions[T](reference: Reference[T]): Set[(Element[T], Contingency)]

    Permalink

    Returns all resolutions of the given reference.

    Returns all resolutions of the given reference. Considers all possible values of each of the elements on the path and all elements with each name on the path. Along with each possible resolution, it returns the contingency (values of elements along the path) required to make that resolution be the one.

    Definition Classes
    ElementCollection
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def assertEvidence[T](reference: Reference[T], evidence: Evidence[T], contingency: Contingency = List()): Unit

    Permalink

    Assert the given evidence on the given reference.

    Assert the given evidence on the given reference. The third argument is an optional contingency. This method makes sure to assert the evidence on all possible resolutions of the reference.

    Definition Classes
    ElementCollection
  9. def assertEvidence(evidencePairs: Seq[NamedEvidence[_]]): Unit

    Permalink

    Assert the given evidence associated with references to elements in the collection.

    Assert the given evidence associated with references to elements in the collection.

    Definition Classes
    ElementCollection
  10. def clear(): Unit

    Permalink

    Clear the universe of all elements.

  11. def clearTemporaries(): Unit

    Permalink

    Clear the universe of all temporary elements.

    Clear the universe of all temporary elements. I.e., elements that were created as the result of expanding a chain.

  12. def clearUnnamed(): Unit

    Permalink

    Clear the universe of all elements with no explicit name.

    Clear the universe of all elements with no explicit name. This is useful, e.g., in dynamic models, where only named elements can influence subsequent time steps.

  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def conditionedElements: List[Element[_]]

    Permalink

    Elements in the universe that have had a condition applied to them.

  15. def constrainedElements: List[Element[_]]

    Permalink

    Elements in the universe that have had a constraint applied to them.

  16. def deactivate(elems: Traversable[Element[_]]): Unit

    Permalink

    Safely deactivate all the given elements.

  17. def deregister(collection: Shrinkable[Element[_]]): Unit

    Permalink

    Deregister a map of elements.

  18. def deregisterAlgorithm(alg: Algorithm): Unit

    Permalink

    Deregister an algorithm.

  19. def deregisterUniverse(map: Map[Universe, _]): Unit

    Permalink

    Deregister a map that uses this universe as a key.

  20. def directlyUsedBy(elem: Element[_]): Set[Element[_]]

    Permalink

    Returns the set of elements that use the given element in their generation, without recursing.

  21. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    Universe → AnyRef
  24. def get[T](reference: Reference[T]): SingleValuedReferenceElement[T]

    Permalink

    Returns a reference element representing the single-valued reference.

    Returns a reference element representing the single-valued reference. This method produces a new reference element every time it is called.

    Definition Classes
    ElementCollection
  25. def getAggregate[T, U](aggregate: (MultiSet[T]) ⇒ U)(reference: Reference[T]): Aggregate[T, U]

    Permalink

    Returns a reference element representing the aggregate applied to the multi-valued reference.

    Returns a reference element representing the aggregate applied to the multi-valued reference.

    Definition Classes
    ElementCollection
  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  27. def getElementByReference[T](reference: Reference[T]): Element[T]

    Permalink
    Definition Classes
    ElementCollection
  28. def getFirst[T](reference: Reference[T]): (Element[_], Option[Reference[T]])

    Permalink

    Gets the first element in the chain contained by the reference, together with an optional remaining reference.

    Gets the first element in the chain contained by the reference, together with an optional remaining reference. If the reference is simply a name, the element is the referred to element and the remainder is None.

    Definition Classes
    ElementCollection
  29. def hasRef[T](reference: Reference[T]): Boolean

    Permalink

    Returns true if the reference is resolvable on this collection.

    Returns true if the reference is resolvable on this collection. This will always use the most recent element with the reference name.

    Definition Classes
    ElementCollection
  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  31. def independentElements(elems: Traversable[Element[_]]): (Traversable[Element[_]], Traversable[Element[_]])

    Permalink

    Returns the elements in the given set that are independent of all other elements in the set.

    Returns the elements in the given set that are independent of all other elements in the set. I.e., they do not use any of the elements in the set in their generation. Also returns the remaining non-independent elements.

  32. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  33. def layers(elems: Traversable[Element[_]]): List[List[Element[_]]]

    Permalink

    Returns a list of layers of elements in the given set of elements, where the elements in each layer can be generated independently of each other given elements in previous layers.

  34. def namedElements: List[Element[_]]

    Permalink

    All named elements in this collection.

    All named elements in this collection.

    Definition Classes
    ElementCollection
  35. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  38. val parentElements: List[Element[_]]

    Permalink

    The parent elements on which this universe depends.

  39. def permanentElements: List[Element[_]]

    Permalink

    Elements in the universe that are not defined in the context of another element.

  40. def randomStochasticElement(): Element[_]

    Permalink

    Selects a non-deterministic element uniformly at random.

  41. def register(collection: Shrinkable[Element[_]]): Unit

    Permalink

    Register a map so that elements are removed from it when they are deactivated.

    Register a map so that elements are removed from it when they are deactivated. This avoids memory management problems.

  42. def registerAlgorithm(alg: Algorithm): Unit

    Permalink

    Register algorithms that use this universe.

    Register algorithms that use this universe. When the Universe is cleared, all previous algorithms are no longer valid, so they must be killed (if still running).

  43. def registerUniverse(map: Map[Universe, _]): Unit

    Permalink

    Register the maps that this universe is used as a key.

    Register the maps that this universe is used as a key. Needed to make sure Universe is garbage collected when cleared and dereferenced.

  44. def remove[T](element: Element[T]): Unit

    Permalink

    Remove an element from the element collection.

    Remove an element from the element collection.

    Definition Classes
    ElementCollection
  45. def removeEvidence[T](reference: Reference[T], contingency: Contingency = List()): Unit

    Permalink

    Remove any evidence on the given reference.

    Remove any evidence on the given reference. The second argument is an optional contingency. This method makes sure to remove evidence from all possible resolutions of the reference. Note: this method removes all conditions and constraints, no matter when they were added.

    Definition Classes
    ElementCollection
  46. def stochasticElements: List[Element[_]]

    Permalink

    The active non-deterministic elements in the universe.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  49. val universe: Universe

    Permalink

    The universe to which elements in this universe belongs, which is, of course, this universe.

    The universe to which elements in this universe belongs, which is, of course, this universe.

    Definition Classes
    UniverseElementCollection
  50. def usedBy(elem: Element[_]): Set[Element[_]]

    Permalink

    Returns the set of elements that use the given element in their generation, either directly or recursively.

  51. def uses(elem: Element[_]): Set[Element[_]]

    Permalink

    Returns the set of elements that the given element uses in its generation, either directly or recursively.

  52. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. def allElements: List[Element[_]]

    Permalink

    All named elements in this collection.

    All named elements in this collection.

    Definition Classes
    ElementCollection
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.0.0) Use namedElements instead

Inherited from ElementCollection

Inherited from AnyRef

Inherited from Any

Ungrouped