com.cra.figaro.algorithm.factored.factors

BasicFactor

class BasicFactor[T] extends Factor[T]

Default implementation of 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.

Linear Supertypes
Factor[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BasicFactor
  2. Factor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BasicFactor(parents: List[Variable[_]], output: List[Variable[_]])

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def allIndices: List[List[Int]]

    Returns the indices lists corresponding to all the rows in order.

    Returns the indices lists corresponding to all the rows in order.

    Definition Classes
    Factor
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def combination(that: Factor[T], op: (T, T) ⇒ T): Factor[T]

    Generic combination function for factors.

    Generic combination function for factors. By default, this is product, but other operations (such as divide that is a valid operation for some semirings) can use this

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

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

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

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

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

    Returns a new Factor with duplicate variable(s) removed

    Returns a new Factor with duplicate variable(s) removed

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

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

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

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

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

    Definition Classes
    BasicFactorFactor
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def firstIndices: List[Int]

    Returns the list of indices into the variable ranges associated with the first row in the factor.

    Returns the list of indices into the variable ranges associated with the first row in the factor.

    Definition Classes
    Factor
  16. def foldLeft(initial: T, fn: (T, T) ⇒ T): T

    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
  17. def get(indices: List[Int]): T

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

    Definition Classes
    AnyRef → Any
  19. def hasStar: Boolean

    Indicates if any of this Factor's variables has Star

    Indicates if any of this Factor's variables has Star

    Definition Classes
    Factor
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def isEmpty: Boolean

    Indicates if this Factor has any variables

    Indicates if this Factor has any variables

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

    Definition Classes
    Any
  23. def mapTo[U](fn: (T) ⇒ U): Factor[U]

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

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

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

    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
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def nextIndices(indices: List[Int]): Option[List[Int]]

    Given a list of indices corresponding to a row in the factor, returns the list of indices corresponding to the next row.

    Given a list of indices corresponding to a row in the factor, returns the list of indices corresponding to the next row. Returns None if the last index list has been reached.

    Definition Classes
    Factor
  27. final def notify(): Unit

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

    Definition Classes
    AnyRef
  29. lazy val numVars: Int

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

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

    Definition Classes
    BasicFactorFactor
  32. def product(that: Factor[T], semiring: Semiring[T]): Factor[T]

    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 all variables in the two inputs, and the value associated with an assignment is the product of the values in the two inputs.

    Definition Classes
    BasicFactorFactor
  33. def recordArgMax[U](variable: Variable[U], comparator: (T, T) ⇒ Boolean): Factor[U]

    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
  34. def set(indices: List[Int], value: T): Factor[T]

    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
  35. val size: Int

    Definition Classes
    Factor
  36. def sumOver(variable: Variable[_], semiring: Semiring[T]): BasicFactor[T]

    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
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  38. def toReadableString: String

    Produce a readable string representation of the factor

    Produce a readable string representation of the factor

    Definition Classes
    BasicFactorFactor
  39. def toString(): String

    Description that includes the variable list and conditional probabilites

    Description that includes the variable list and conditional probabilites

    Definition Classes
    Factor → AnyRef → Any
  40. def variables: List[Variable[_]]

    Definition Classes
    Factor
  41. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Factor[T]

Inherited from AnyRef

Inherited from Any

Ungrouped