org.knowceans.topics.cgen
Class MixNodeFastSerial

java.lang.Object
  extended by org.knowceans.topics.cgen.MixItem
      extended by org.knowceans.topics.cgen.MixNode
          extended by org.knowceans.topics.cgen.MixNodeFastSerial

public class MixNodeFastSerial
extends MixNode

represents a mixture node with fast serial sampling state

TODO: this may be subclassed for node data types


Field Summary
(package private)  java.lang.String rtheta
          reverse stheta
(package private)  java.lang.String rthetasum
          reverse sthetasum
(package private)  java.lang.String stheta
          sort index over values of theta
(package private)  java.lang.String sthetasum
          sort index over values of thetasum
(package private)  java.lang.String utheta
          norm over values of theta
 
Fields inherited from class org.knowceans.topics.cgen.MixNode
alpha, C1ASINGLE, C1BSEQADD, C1INPUT, C1ROOT, C2MULTI, C3MERGED, C4SWITCH, C5COUPLED, C5MAIN, constK, coupledMainNode, coupledNodes, dimAlpha, E2SPLIT, fixedAlpha, HIDDEN, j, J, jSel, k, K, kSel, N6AGGREG, NOEDGE, ntheta, nthetasum, SEQINPUT, SEQUENCE, sparse, T, theta, TOPIC, VISIBLE
 
Fields inherited from class org.knowceans.topics.cgen.MixItem
children, datatype, indent, linktype, name, parents, UNRECOG
 
Constructor Summary
MixNodeFastSerial(java.lang.String name, java.lang.String theta, boolean sparse)
          create a visible node
MixNodeFastSerial(java.lang.String name, java.lang.String theta, java.lang.String alpha)
          constructs a hidden node
 
Method Summary
 java.lang.String declareVars()
          declare node structures
 java.lang.String getGibbsTerm(MixSequence seq, java.util.List<MixEdge> ee, boolean q)
           
 java.lang.String incNode(MixSequence seq, java.util.List<MixEdge> ee, boolean inc, boolean q, boolean synced)
          return code to increment this node's counts
 java.lang.String initVars(boolean q)
          initialise this node
 
Methods inherited from class org.knowceans.topics.cgen.MixNode
assignVarsInput, check, classify, coupleNode, coupleParams, expandSelector, getAlphaEstimator, getChildEdge, getChildEdge, getChildren, getComponentCount, getCoupledNodes, getEdge, getLatexGibbsTerm, getLikelihoodTerm, getName, getParentEdge, getParentEdge, getParents, getThetaEstimator, getVariable, intersection, kIndex, listTypedVarsInput, listVarsInput, nameEmptyVars, printDetails, printSelector, printType, setConstants, tIndex, toString
 
Methods inherited from class org.knowceans.topics.cgen.MixItem
typeString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

utheta

java.lang.String utheta
norm over values of theta


stheta

java.lang.String stheta
sort index over values of theta


rtheta

java.lang.String rtheta
reverse stheta


sthetasum

java.lang.String sthetasum
sort index over values of thetasum


rthetasum

java.lang.String rthetasum
reverse sthetasum

Constructor Detail

MixNodeFastSerial

public MixNodeFastSerial(java.lang.String name,
                         java.lang.String theta,
                         java.lang.String alpha)
constructs a hidden node

Parameters:
name -
theta -
alpha -

MixNodeFastSerial

public MixNodeFastSerial(java.lang.String name,
                         java.lang.String theta,
                         boolean sparse)
create a visible node

Parameters:
name -
theta -
sparse - whether it is connected with a label sequence (like authors) that associates only the non-null subset of the domain
Method Detail

declareVars

public java.lang.String declareVars()
declare node structures

Overrides:
declareVars in class MixNode
Parameters:
u -
n -
Returns:

initVars

public java.lang.String initVars(boolean q)
initialise this node

Overrides:
initVars in class MixNode
Parameters:
q -
Returns:

getGibbsTerm

public java.lang.String getGibbsTerm(MixSequence seq,
                                     java.util.List<MixEdge> ee,
                                     boolean q)
Overrides:
getGibbsTerm in class MixNode

incNode

public java.lang.String incNode(MixSequence seq,
                                java.util.List<MixEdge> ee,
                                boolean inc,
                                boolean q,
                                boolean synced)
return code to increment this node's counts

Overrides:
incNode in class MixNode
Parameters:
ee - active edges
inc - whether to increment or decrement
q - for querying
synced - use synchronisation
Returns: