cc.mallet.grmm.types
Class BoltzmannUnaryFactor

java.lang.Object
  extended by cc.mallet.grmm.types.AbstractTableFactor
      extended by cc.mallet.grmm.types.TableFactor
          extended by cc.mallet.grmm.types.BoltzmannUnaryFactor
All Implemented Interfaces:
DiscreteFactor, Factor, java.io.Serializable, java.lang.Cloneable

public class BoltzmannUnaryFactor
extends TableFactor

A factor over a continuous variable theta and binary variables var. such that phi(x|theta) is Potts. That is, for fixed theta, phi(x) = 1 if all x are equal, and exp^{-theta} otherwise. $Id: BoltzmannUnaryFactor.java,v 1.1 2007/10/22 21:37:44 mccallum Exp $

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cc.mallet.grmm.types.AbstractTableFactor
probs
 
Constructor Summary
BoltzmannUnaryFactor(Variable var, double theta)
           
 
Method Summary
 boolean almostEquals(Factor p, double epsilon)
           
 Factor duplicate()
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isNaN()
           
 Factor multiply(Factor other)
          Returns the elementwise product of this potential and another one.
 java.lang.String prettyOutputString()
           
 
Methods inherited from class cc.mallet.grmm.types.TableFactor
createBlankSubset, divideByInternal, exponentiate, getLogValueMatrix, getValueMatrix, logValue, logValue, logValue, makeFromLogValues, marginalizeInternal, multiplyAll, multiplyAll, multiplyByInternal, normalize, plusEqualsAtLocation, plusEqualsInternal, rawValue, rawValue, recenter, setLogValue, setLogValue, setLogValues, setValue, setValues, slice_general, slice_onevar, slice_twovar, sum, timesEquals, value, value, value, valueAtLocation
 
Methods inherited from class cc.mallet.grmm.types.AbstractTableFactor
almostEquals, argmax, assignmentIterator, asTable, clone, containsVar, divideBy, divideBy, dumpToString, ensureOperandCompatible, entropy, extractMax, extractMax, extractMax, findVariable, getNumVars, getValues, getVariable, indexAtLocation, logsum, makeIdentityFactor, marginalize, marginalize, marginalize, marginalizeOut, marginalizeOut, multiplyBy, numLocations, plusEquals, plusEquals, printSizes, printValues, sample, sampleLocation, setRawValue, setRawValue, setRawValue, setValues, singleIndex, slice, toLogValueArray, toString, toValueArray, varSet
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoltzmannUnaryFactor

public BoltzmannUnaryFactor(Variable var,
                            double theta)
Method Detail

duplicate

public Factor duplicate()
Specified by:
duplicate in interface Factor
Overrides:
duplicate in class TableFactor

almostEquals

public boolean almostEquals(Factor p,
                            double epsilon)
Specified by:
almostEquals in interface Factor
Overrides:
almostEquals in class AbstractTableFactor

isNaN

public boolean isNaN()
Specified by:
isNaN in interface Factor
Overrides:
isNaN in class AbstractTableFactor

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

prettyOutputString

public java.lang.String prettyOutputString()
Specified by:
prettyOutputString in interface Factor
Overrides:
prettyOutputString in class AbstractTableFactor

multiply

public Factor multiply(Factor other)
Description copied from class: AbstractTableFactor
Returns the elementwise product of this potential and another one.

Specified by:
multiply in interface Factor
Overrides:
multiply in class AbstractTableFactor