Object

org.scalarules.engine

FactEngine

Related Doc: package engine

Permalink

object FactEngine

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FactEngine
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class EvaluationException(message: String, derivation: Derivation, cause: Throwable) extends Exception with Product with Serializable

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

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def constructGraph(derivations: List[Derivation]): Set[Node]

    Permalink

    Constructs a Dependency graph for the provided list of Derivations.

    Constructs a Dependency graph for the provided list of Derivations. Each Derivation will yield a Node describing its output and other Nodes requiring its output.

    derivations

    a List of all possible Derivations

    returns

    a Set of Nodes which reference their dependent Nodes

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. def evaluatorExceptionWrapper[A](evaluator: (A, Derivation) ⇒ A): (A, Derivation) ⇒ A

    Permalink
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def levelSorter(originalNodes: Set[Node]): Levels

    Permalink

    Determines the order in which Facts should be calculated, based on their inputs.

    Determines the order in which Facts should be calculated, based on their inputs. It takes a Derivation-graph as constructed by FactEngine.constructGraph and orders them in levels. Each level contains Derivation-nodes for which the inputs will have been determined in an earlier level. Following these levels while running a derivation cycle will guarantee correct causality between individual Derivations.

    originalNodes

    the Set of Nodes describing the dependency graph between Derivations

    returns

    a List of levels that produce facts required for subsequent levels. Each level is a list of Nodes that can be evaluated once all previous levels have been evaluated

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

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

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

    Permalink
    Definition Classes
    AnyRef
  18. def runDebugDerivations(c: Context, derivations: List[Derivation]): (Context, List[Step])

    Permalink

    Runs the provided Derivations and yields the resulting Context as well as a List of all Steps computed.

    Runs the provided Derivations and yields the resulting Context as well as a List of all Steps computed.

    c

    initial Context containing all input values.

    derivations

    a List of Derivations to consider with all the input values.

    returns

    a tuple containing the resulting Context and a List of all Steps taken.

  19. def runDerivations[A](state: A, derivations: List[Derivation], evaluator: (A, Derivation) ⇒ A): A

    Permalink

    Takes a List of Derivations an abstract initial situation and an evaluation function.

    Takes a List of Derivations an abstract initial situation and an evaluation function. This then creates an evaluation graph and starts evaluating the nodes. Each actual evaluation is delegated to the evaluator argument.

    A

    type of state used by the evaluator function. The algorithm is oblivious to the structure of the state and will only pass it to the evaluator function.

    state

    initial state to pass into the evaluator function when visiting the first node. Any subsequent invocations of the evaluator function will be provided with the result of processing the previous node.

    derivations

    a List of all Derivations to consider. The function will try to call all derivations for which inputs become available.

    evaluator

    the function to process a node. This function is provided the current state and the derivation of the current node. It must return a new state to be used for the next node.

    returns

    the resulting state of the last invocation to the evaluator function.

  20. def runNormalDerivations(c: Context, derivations: List[Derivation]): Context

    Permalink

    Runs the provided Derivations and yields the resulting Context containing all inputs as well as all computed values.

    Runs the provided Derivations and yields the resulting Context containing all inputs as well as all computed values.

    c

    initial Context containing all the input values.

    derivations

    a List of Derivations to consider with all the input values.

    returns

    a Context containing all input values and all computed values.

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped