edu.ub.guillermoblascojimenez.gmx.model

Factor

trait Factor extends Serializable

Factor trait that defines the operations of a function over a finite set of variables. The factors are mutable via direct assignment of its values, but any other operation that is not update a value of the factor creates a new factor with no modification of this or other factors implied in the operation.

Let name this factor as phi.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Factor
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def *(c: Double): Factor

    Creates a new factor containing the values of the product between this factor and a constant value.

    Creates a new factor containing the values of the product between this factor and a constant value. This is: phi * c

    c

    The constant value to multiply, greater than zero.

    returns

    The product of this factor and the constant.

  2. abstract def *(psi: Factor): Factor

    Creates a new factor containing the values of the product between this factor and the given factor.

    Creates a new factor containing the values of the product between this factor and the given factor. That is: phi * psi The scope of the returned factor is the union of scopes.

    psi

    The factor to multiply with.

    returns

    The product of this factor and the given.

  3. abstract def /(c: Double): Factor

    Creates a new factor containing the values of the division between this factor and a constant value.

    Creates a new factor containing the values of the division between this factor and a constant value. This is: phi / c that is computed as phi * (1 / c)

    c

    The constant value to multiply, greater than zero.

    returns

    The division of this factor and the given constant.

  4. abstract def /(psi: Factor): Factor

    Creates a new factor containing the values of the division between this factor and the given factor.

    Creates a new factor containing the values of the division between this factor and the given factor. That is: phi / psi That is computed as phi * ( 1 / psi) The scope of the returned factor is the union of scopes.

    psi

    The divisor factor

    returns

    The division of this factor and the given.

  5. abstract def apply(assignment: Map[Variable, Int]): Double

    Gets the value of this factor for an assignment.

    Gets the value of this factor for an assignment. This is phi(assignment). Usage: phi(Map(/* assignment */)

    assignment

    Assignment to be read.

    returns

    The value attached to the given assignment for this factor.

  6. abstract def copy(): Factor

    Creates a new factor that is contains the same values and scope that this.

    Creates a new factor that is contains the same values and scope that this.

    returns

    A copy of this factor.

  7. abstract def inverse(): Factor

    Creates a new factor that has the values inverted.

    Creates a new factor that has the values inverted. The rule 1/0 := 0 applies. This is: 1 / phi

    returns

    The inverse of the factor

  8. abstract def marginal(variables: Set[Variable]): Factor

    Creates a new factor with as scope the given variables.

    Creates a new factor with as scope the given variables. The values of the new factor is the marginalization via summation, also called summed-out. This is sum_{variables}(phi)

    variables

    Variables to get as marginal.

    returns

    A factor marginalized over the given variables.

  9. abstract def marginalize(variables: Set[Variable]): Factor

    Creates a new factor with as scope the scope of the factor minus the given variables.

    Creates a new factor with as scope the scope of the factor minus the given variables. The values of the new factor is the marginalization via summation. This is sum_{scope - variables}(phi)

    variables

    Variables to be marginalized.

    returns

    A factor with the given variables marginalized.

  10. abstract def maxMarginal(variables: Set[Variable]): Factor

    Creates a new factor with as scope the given variables.

    Creates a new factor with as scope the given variables. The values of the new factor is the marginalization via maximization. This is max_{variables}(phi)

    variables

    Variables to get as max marginal.

    returns

    A factor max marginalized over the given variables.

  11. abstract def maxMarginalize(variables: Set[Variable]): Factor

    Creates a new factor with as scope the scope of the factor minus the given variables.

    Creates a new factor with as scope the scope of the factor minus the given variables. The values of the new factor is the marginalization via maximization. This is max{scope - variables}(phi)

    variables

    Variables to be max marginalized.

    returns

    A factor with the given variables max marginalized.

  12. abstract def normalized(): Factor

    Creates a new factor with the values divided by z value.

    Creates a new factor with the values divided by z value. This is: phi / z. The z value of the returned factor is 1.

    returns

    The factor normalized.

  13. abstract val scope: Set[Variable]

    The scope of the factor.

    The scope of the factor.

    returns

    The scope of the factor.

  14. abstract val size: Int

    The amount of entries that the factor has.

    The amount of entries that the factor has.

    returns

    Amount of entries of the factor

  15. abstract def update(assignment: Map[Variable, Int], value: Double): Unit

    Updates the value of this factor for an assignment.

    Updates the value of this factor for an assignment. This is phi(assignment) := value. Usage: phi(Map(/* assignments */) = value

    assignment

    Assignment to be updated.

    value

    Value of the assignment.

  16. abstract def z(): Double

    Returns the summation of all values.

    Returns the summation of all values. Often named as z value or partition function. This is sum_{scope}(phi)

    returns

    The summation of all values.

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

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped