RBNLearning
Class GradientGraphNode

java.lang.Object
  extended by RBNLearning.GradientGraphNode
All Implemented Interfaces:
java.lang.Comparable<GradientGraphNode>
Direct Known Subclasses:
GradientGraphLikelihoodNode, GradientGraphProbFormNode

public abstract class GradientGraphNode
extends java.lang.Object
implements java.lang.Comparable<GradientGraphNode>


Constructor Summary
GradientGraphNode(GradientGraph gg)
           
 
Method Summary
 void addToChildren(GradientGraphProbFormNode ggpfn)
           
 void addToParents(GradientGraphNode ggn)
           
 java.util.TreeSet<GradientGraphNode> ancestors()
          Returns the set of all ancestors of this node in the Graph
 int childrenSize()
           
 int compareTo(GradientGraphNode other)
           
 boolean equals(GradientGraphNode other)
           
abstract  double evaluate()
          Evaluate this GradientGraphNode using current values of parameters and the current instantiation for unobserved atoms.
abstract  void evaluateBounds()
           
abstract  double evaluateGrad(int param)
           
 java.lang.Double[] gradient()
           
abstract  java.lang.String name()
          The name of this node.
 java.util.TreeSet<GradientGraphNode> parents()
           
 void reEvaluateUpstream()
          Re-evaluates all ancestor nodes of this node.
 void resetGradient()
           
 void resetValue()
           
 double value()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradientGraphNode

public GradientGraphNode(GradientGraph gg)
Method Detail

addToChildren

public void addToChildren(GradientGraphProbFormNode ggpfn)

evaluate

public abstract double evaluate()
Evaluate this GradientGraphNode using current values of parameters and the current instantiation for unobserved atoms. Returns the value and sets the value field of the node. If the value is not null, then the this value is assumed to be the currently correct value, and is returned


evaluateGrad

public abstract double evaluateGrad(int param)

evaluateBounds

public abstract void evaluateBounds()

name

public abstract java.lang.String name()
The name of this node. The name identifies the function represented by a node. Names are unique.


value

public double value()

gradient

public java.lang.Double[] gradient()

resetValue

public void resetValue()

resetGradient

public void resetGradient()

childrenSize

public int childrenSize()

parents

public java.util.TreeSet<GradientGraphNode> parents()

addToParents

public void addToParents(GradientGraphNode ggn)

equals

public boolean equals(GradientGraphNode other)

compareTo

public int compareTo(GradientGraphNode other)
Specified by:
compareTo in interface java.lang.Comparable<GradientGraphNode>

ancestors

public java.util.TreeSet<GradientGraphNode> ancestors()
Returns the set of all ancestors of this node in the Graph

Returns:

reEvaluateUpstream

public void reEvaluateUpstream()
Re-evaluates all ancestor nodes of this node. Used to propagate value changes when the value of this node has been changed. Mostly applied when this is a GradientGraphIndicatorNode, and the value of this indicator has been changed in Gibbs sampling.