com.cra.figaro.language

Universe

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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

    parentElements

    The parent elements on which this universe depends.

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

    The active elements in the universe.

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

    Add an element to the element collection.

    Add an element to the element collection.

    Definition Classes
    ElementCollection
  8. def allElements: List[Element[_]]

    All the elements in this collection.

    All the elements in this collection.

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

    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
  10. final def asInstanceOf[T0]: T0

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

    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
  12. def assertEvidence(evidencePairs: Seq[NamedEvidence[_]]): Unit

    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
  13. def clear(): Unit

    Clear the universe of all elements.

  14. def clearTemporaries(): Unit

    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.

  15. def clearUnnamed(): Unit

    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.

  16. def clone(): AnyRef

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

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

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

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

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

    Safely deactivate all the given elements.

  20. def deregisterAlgorithm(alg: Algorithm): Unit

    Deregister an algorithm.

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

    Returns the set of elements that are directly used by the given element, without recursing.

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

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

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

    Definition Classes
    Universe → AnyRef
  25. def generateAll(): Unit

    Generate values for the elements in the universe, making sure to generate arguments before their dependent elements.

    Generate values for the elements in the universe, making sure to generate arguments before their dependent elements. This method should be called by algorithms that need elements to be initialized with values.

  26. def get[T](reference: Reference[T]): SingleValuedReferenceElement[T]

    Returns a reference element representing the single-valued reference.

    Returns a reference element representing the single-valued reference.

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

    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
  28. final def getClass(): Class[_]

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

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

    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
  31. def hasRef[T](reference: Reference[T]): Boolean

    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
  32. def hashCode(): Int

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

    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.

  34. final def isInstanceOf[T0]: Boolean

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

    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.

  36. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  37. final def notify(): Unit

    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

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

    The parent elements on which this universe depends.

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

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

  41. def randomStochasticElement(): Element[_]

    Selects a non-deterministic element uniformly at random.

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

    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.

  43. def registerAlgorithm(alg: Algorithm): Unit

    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)

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

    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

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

    Remove an element from the element collection.

    Remove an element from the element collection.

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

    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
  47. def stochasticElements: List[Element[_]]

    The active non-deterministic elements in the universe.

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

    Definition Classes
    AnyRef
  49. def toString(): String

    Definition Classes
    AnyRef → Any
  50. val universe: Universe

    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
  51. def usedBy(elem: Element[_]): Set[Element[_]]

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

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

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

  53. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ElementCollection

Inherited from AnyRef

Inherited from Any

Ungrouped