Class

com.cra.figaro.algorithm.factored.factors

ConstraintFactor

Related Doc: package factors

Permalink

class ConstraintFactor[T] extends BasicFactor[T]

Constraint Factor. A factor is associated with a set of variables and specifies a value for every combination of assignments to those variables. Factors are parameterized by the types of values they contain.

This factor is used to model constraints on elements.

Linear Supertypes
BasicFactor[T], Factor[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConstraintFactor
  2. BasicFactor
  3. Factor
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConstraintFactor(parents: List[Variable[_]], output: List[Variable[_]], _semiring: Semiring[T] = ...)(implicit tag: scala.reflect.api.JavaUniverse.TypeTag[T])

    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 combination(that: Factor[T], op: (T, T) ⇒ T): Factor[T]

    Permalink

    produces a new Factor from the combined input variables of the input factors.

    produces a new Factor from the combined input variables of the input factors.

    The factor values are computed using the corresponding values from the input factors. This correspondence is determined by the indices of the input factors that overlap with each of the indices of the result factor

    that

    The Factor to combine with this one

    op

    The operation used to combine (multiply) factor values

    returns

    The new Factor containing the combined values of the inputs

    Definition Classes
    BasicFactorFactor
  7. def contains(index: List[Int]): Boolean

    Permalink
    Definition Classes
    Factor
  8. var contents: Map[List[Int], T]

    Permalink
    Attributes
    protected[com.cra.figaro]
    Definition Classes
    Factor
  9. def convert[U](semiring: Semiring[U]): Factor[U]

    Permalink

    Creates a new Factor of the same class with a different type and semiring

    Creates a new Factor of the same class with a different type and semiring

    Definition Classes
    BasicFactorFactor
  10. def convertIndicesToValues(indices: List[Int]): List[Extended[_]]

    Permalink
    Definition Classes
    Factor
  11. def createFactor[T](parents: List[Variable[_]], output: List[Variable[_]], _semiring: Semiring[T] = semiring): Factor[T]

    Permalink

    Creates a new factor of the same type

    Creates a new factor of the same type

    Definition Classes
    BasicFactorFactor
  12. def deDuplicate(): Factor[T]

    Permalink

    Returns a new Factor with duplicate variable(s) removed

    Returns a new Factor with duplicate variable(s) removed

    Definition Classes
    BasicFactorFactor
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def fillByRule(rule: (List[Extended[_]]) ⇒ T): Factor[T]

    Permalink

    Fill the contents of this factor by applying a rule to every combination of parent and output values.

    Fill the contents of this factor by applying a rule to every combination of parent and output values.

    Definition Classes
    BasicFactorFactor
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def foldLeft(initial: T, fn: (T, T) ⇒ T): T

    Permalink

    Fold the given function through the contents of the factor, beginning with the given initial values

    Fold the given function through the contents of the factor, beginning with the given initial values

    Definition Classes
    Factor
  18. def generateIndices: Indices

    Permalink
    Definition Classes
    Factor
  19. def get(indices: List[Int]): T

    Permalink

    Get the value associated with a row.

    Get the value associated with a row. The row is identified by an list of indices into the ranges of the variables over which the factor is defined.

    Definition Classes
    BasicFactorFactor
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getIndices: Indices

    Permalink
    Definition Classes
    Factor
  22. def hasStar: Boolean

    Permalink

    Indicates if any of this Factor's variables has Star

    Indicates if any of this Factor's variables has Star

    Definition Classes
    Factor
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. val isConstraint: Boolean

    Permalink

    Indicates if this Factor is condition/constrained

    Indicates if this Factor is condition/constrained

    Definition Classes
    ConstraintFactorFactor
  25. def isEmpty: Boolean

    Permalink

    Indicates if this Factor has any variables

    Indicates if this Factor has any variables

    Definition Classes
    Factor
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. def mapTo[U](fn: (T) ⇒ U, _semiring: Semiring[U] = semiring): Factor[U]

    Permalink

    Convert the contents of the target by applying the given function to all elements of this factor.

    Convert the contents of the target by applying the given function to all elements of this factor.

    Definition Classes
    BasicFactorFactor
  28. def marginalizeTo(semiring: Semiring[T], targets: Variable[_]*): Factor[T]

    Permalink

    Returns the marginalization of the factor to a variable according to the given addition function.

    Returns the marginalization of the factor to a variable according to the given addition function. This involves summing out all other variables.

    Definition Classes
    BasicFactorFactor
  29. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  32. lazy val numVars: Int

    Permalink
    Definition Classes
    Factor
  33. val output: List[Variable[_]]

    Permalink

    The single output variable for this factor

    The single output variable for this factor

    Definition Classes
    BasicFactorFactor
  34. val parents: List[Variable[_]]

    Permalink

    A list of parent variables for this factor representing all the dependencies of this factor

    A list of parent variables for this factor representing all the dependencies of this factor

    Definition Classes
    BasicFactorFactor
  35. def product(that: Factor[T]): Factor[T]

    Permalink

    returns the product of this factor with another factor according to a given multiplication function.

    returns the product of this factor with another factor according to a given multiplication function. The product is associated with the combined variables of the two inputs, and the value associated with an assignment is the product of the values in the two inputs.

    Definition Classes
    BasicFactorFactor
  36. def recordArgMax[U](variable: Variable[U], comparator: (T, T) ⇒ Boolean, _semiring: Semiring[U] = semiring.asInstanceOf[Semiring[U]]): Factor[U]

    Permalink

    Returns a factor that maps values of the other variables to the value of the given variable that maximizes the entry associated with that value, according to some maximization function.

    Returns a factor that maps values of the other variables to the value of the given variable that maximizes the entry associated with that value, according to some maximization function. comparator defines the maximization. It returns true iff its second argument is greater than its first.

    U

    The type of element whose value is being recorded. The resulting factor maps values of other variables in this factor to this type.

    Definition Classes
    BasicFactorFactor
  37. val semiring: Semiring[T]

    Permalink

    A Semiring class that defines the operations (sum/max, product) to be used in this factor.

    A Semiring class that defines the operations (sum/max, product) to be used in this factor. This defaults to SumProductSemiring

    Definition Classes
    BasicFactorFactor
  38. def set(indices: List[Int], value: T): Factor[T]

    Permalink

    Set the value associated with a row.

    Set the value associated with a row. The row is identified by an list of indices into the ranges of the variables over which the factor is defined.

    Definition Classes
    Factor
  39. val size: Int

    Permalink
    Definition Classes
    Factor
  40. def sumOver(variable: Variable[_]): Factor[T]

    Permalink

    Returns the summation of the factor over a variable according to an addition function.

    Returns the summation of the factor over a variable according to an addition function. The result is associated with all the variables in the input except for the summed over variable and the value for a set of assignments is the sum of the values of the corresponding assignments in the input.

    Definition Classes
    BasicFactorFactor
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def toReadableString: String

    Permalink

    Produce a readable string representation of the factor

    Produce a readable string representation of the factor

    Definition Classes
    BasicFactorFactor
  43. def toString(): String

    Permalink

    Description that includes the variable list and conditional probabilities

    Description that includes the variable list and conditional probabilities

    Definition Classes
    Factor → AnyRef → Any
  44. def unionVars[U](that: Factor[U]): (List[Variable[_]], List[Variable[_]], List[Int], List[Int])

    Permalink

    takes the variables in two factors and produces their set union.

    takes the variables in two factors and produces their set union.

    It produces a mapping from each original variable to its new location. Similarly it produces a mapping from each new variable to its new location.

    Definition Classes
    BasicFactor
  45. def variables: List[Variable[_]]

    Permalink
    Definition Classes
    Factor
  46. final def wait(): Unit

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

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

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

Inherited from BasicFactor[T]

Inherited from Factor[T]

Inherited from AnyRef

Inherited from Any

Ungrouped