|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.duke.cs.banjo.bayesnet.NodeScoreCacheItem
Implements storing the (already computed) node scores in a hash.
Details:
- Computes the hash code needed for storing an item in a hash
- Implements comparison ('equal') between items
Change History:
Created on May 4, 2004
Field Summary | |
private int |
hashCode
|
private int |
nodeID
|
private double |
nodeScore
|
private int[][] |
parentIDlist
|
Constructor Summary | |
NodeScoreCacheItem()
Basic constructor for creating a cached item. |
|
NodeScoreCacheItem(int _nodeID,
int[][] _parentIDlist,
double _nodeScore)
constructor for creating a cached item from the set of underlying parameters. |
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 _objToCompareTo)
|
int |
getHashCode()
|
int |
getHashCode(int _nodeID,
int[][] _parentIDlist)
|
int |
getNodeID()
|
double |
getNodeScore()
|
boolean |
hasIdenticalParentList(int[][] listToCheck)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private int nodeID
private int[][] parentIDlist
private double nodeScore
private int hashCode
Constructor Detail |
public NodeScoreCacheItem()
public NodeScoreCacheItem(int _nodeID, int[][] _parentIDlist, double _nodeScore)
_nodeID
- The node ID of the item._parentIDlist
- The list of parent IDs of the item._nodeScore
- The nodeScore of the item.Method Detail |
public void assignNodeScoreHashItem(int _nodeID, int[][] _parentIDlist, double _nodeScore)
assignNodeScoreHashItem
in interface NodeScoreCacheItemI
_nodeID
- The node ID of the item._parentIDlist
- The list of parent IDs of the item._nodeScore
- The nodeScore of the item.public int getHashCode()
getHashCode
in interface NodeScoreCacheItemI
public int getHashCode(int _nodeID, int[][] _parentIDlist)
getHashCode
in interface NodeScoreCacheItemI
_nodeID
- The node ID of the item._parentIDlist
- The list of parent IDs of the item.
public boolean equals(java.lang.Object _objToCompareTo)
equals
in interface NodeScoreCacheItemI
public java.lang.String toString()
public double getNodeScore()
getNodeScore
in interface NodeScoreCacheItemI
public int getNodeID()
getNodeID
in interface NodeScoreCacheItemI
public boolean hasIdenticalParentList(int[][] listToCheck)
hasIdenticalParentList
in interface NodeScoreCacheItemI
listToCheck
- The list of parent IDs to compare with.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |