edu.duke.cs.banjo.bayesnet
Class BayesNetChange

java.lang.Object
  extended byedu.duke.cs.banjo.bayesnet.BayesNetChange
All Implemented Interfaces:
BayesNetChangeI

public class BayesNetChange
extends java.lang.Object
implements BayesNetChangeI

Defines a change to the BayesNet.

Details:
- Stores the ID of the current node, the ID and the lag of the parent node, and type and status of a change that can be applied to a BayesNet (as represented by a BayesNetManager).
The status value is used for tracking the proper use of a bayesNetChange within the search process. Acceptable values are:
   CHANGESTATUS_READY - used when the change is assigned and ready to be applied
   CHANGESTATUS_APPLIED - after the change has been applied to the bayes net
   CHANGESTATUS_UNDONE - after the change has been undone (i.e., the change did not lead to a higher score)

Change History:
Created on Mar 10, 2004

Author:
Jurgen Sladeczek (hjs)
For the latest info, please visit www.cs.duke.edu.

Field Summary
private  int changeStatus
           
private  int changeType
           
private  int currentNodeID
           
private  int parentNodeID
           
private  int parentNodeLag
           
 
Constructor Summary
BayesNetChange()
           
BayesNetChange(BayesNetChangeI _bayesNetChange)
           
BayesNetChange(int currentNodeID, int _parentNodeID, int _parentNodeLag, int _changeType)
           
 
Method Summary
 int getChangeStatus()
           
 int getChangeType()
           
 int getCurrentNodeID()
           
 int getParentNodeID()
           
 int getParentNodeLag()
           
 void resetChange()
          Special case of update.
 void setChangeStatus(int _changeStatus)
          The status of a BayesNetChange may change over the search process.
 java.lang.String toString()
           
 void updateChange(BayesNetChangeI _bayesNetChange)
           
 void updateChange(int _currentNodeID, int _parentNodeID, int _parentNodeLag, int _changeType)
          Sets a BayesNetChange by assigning the currentNodeID, the parentNodeID, the parentNodeLag, and the changeType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

currentNodeID

private int currentNodeID

parentNodeID

private int parentNodeID

parentNodeLag

private int parentNodeLag

changeType

private int changeType

changeStatus

private int changeStatus
Constructor Detail

BayesNetChange

public BayesNetChange()

BayesNetChange

public BayesNetChange(int currentNodeID,
                      int _parentNodeID,
                      int _parentNodeLag,
                      int _changeType)

BayesNetChange

public BayesNetChange(BayesNetChangeI _bayesNetChange)
Method Detail

updateChange

public void updateChange(BayesNetChangeI _bayesNetChange)

updateChange

public void updateChange(int _currentNodeID,
                         int _parentNodeID,
                         int _parentNodeLag,
                         int _changeType)
Description copied from interface: BayesNetChangeI
Sets a BayesNetChange by assigning the currentNodeID, the parentNodeID, the parentNodeLag, and the changeType. The individual values for these fields are always associated with a single BayesNetChange, and there is no use for setting them separately.

Specified by:
updateChange in interface BayesNetChangeI
Parameters:
_currentNodeID - The currentNodeID to set.
_parentNodeID - The parentNodeID to set.
_parentNodeLag - The parentNodeLag to set.
_changeType - The changeType to set.

resetChange

public void resetChange()
Description copied from interface: BayesNetChangeI
Special case of update. From the point of process logic, we keep this method separate from the general assignment of a BayesNetChange.

Specified by:
resetChange in interface BayesNetChangeI

getChangeType

public int getChangeType()
Specified by:
getChangeType in interface BayesNetChangeI
Returns:
Returns the changeType.

getChangeStatus

public int getChangeStatus()
Specified by:
getChangeStatus in interface BayesNetChangeI
Returns:
Returns the changeStatus.

setChangeStatus

public void setChangeStatus(int _changeStatus)
Description copied from interface: BayesNetChangeI
The status of a BayesNetChange may change over the search process. We use this field as an internal check mechanism within the process flow.

Specified by:
setChangeStatus in interface BayesNetChangeI
Parameters:
_changeStatus - The changeStatus to set.

getCurrentNodeID

public int getCurrentNodeID()
Specified by:
getCurrentNodeID in interface BayesNetChangeI
Returns:
Returns the currentNodeID.

getParentNodeID

public int getParentNodeID()
Specified by:
getParentNodeID in interface BayesNetChangeI
Returns:
Returns the parentNodeID.

getParentNodeLag

public int getParentNodeLag()
Specified by:
getParentNodeLag in interface BayesNetChangeI
Returns:
Returns the parentNodeLag.

toString

public java.lang.String toString()