edu.duke.cs.banjo.bayesnet
Interface NodeScoreCacheItemI

All Known Implementing Classes:
NodeScoreCacheItem

public interface NodeScoreCacheItemI

Documents the interface for creating a NodeScoreCacheItem implementation.

Details:

Change History:
Created on Feb 17, 2005

Author:
hjs
For the latest info, please visit www.cs.duke.edu.

Method Summary
 void assignNodeScoreHashItem(int nodeID, int[][] parentIDlist, double nodeScore)
          Assigns a cached item using the underlying parameters that describe it.
 boolean equals(java.lang.Object otherObj)
           
 int getHashCode()
           
 int getHashCode(int nodeID, int[][] parentIDlist)
           
 int getNodeID()
           
 double getNodeScore()
           
 boolean hasIdenticalParentList(int[][] listToCheck)
           
 

Method Detail

assignNodeScoreHashItem

public void assignNodeScoreHashItem(int nodeID,
                                    int[][] parentIDlist,
                                    double nodeScore)
Assigns a cached item using the underlying parameters that describe it. Note that the associated hashcode is being computed within this method

Parameters:
nodeID - The node ID of the item.
parentIDlist - The list of parent IDs of the item.
nodeScore - The nodeScore of the item.

getHashCode

public int getHashCode()
Returns:
Returns the hash code of the cached item.

getHashCode

public int getHashCode(int nodeID,
                       int[][] parentIDlist)
Parameters:
nodeID - The node ID of the item.
parentIDlist - The list of parent IDs of the item.
Returns:
Returns the hash code of the cached item after it is computed based on the supplied parameters.

equals

public boolean equals(java.lang.Object otherObj)
Returns:
Returns the result of comparing this item to another CacheItem.

getNodeScore

public double getNodeScore()
Returns:
Returns the nodeScore.

getNodeID

public int getNodeID()
Returns:
Returns the nodeID.

hasIdenticalParentList

public boolean hasIdenticalParentList(int[][] listToCheck)
Parameters:
listToCheck - The list of parent IDs to compare with.
Returns:
Returns the result of comparing to a supplied parent list.