edu.duke.cs.banjo.bayesnet
Class BayesNetStructure
java.lang.Object
edu.duke.cs.banjo.bayesnet.BayesNetStructure
- All Implemented Interfaces:
- BayesNetStructureI, java.lang.Comparable
- public class BayesNetStructure
- extends java.lang.Object
- implements java.lang.Comparable, BayesNetStructureI
Stores a basic BayesNet structure (where the use of a BayesNetManager is redundant).
Details:
- Used for storing the N-best network structures.
- Similar to the BayesNetManager, but without the overhead of tracking multiple
subsets of nodes (parents).
- Uses internal knowledge about the EdgesAsMatrix class for performance reasons.
Change History:
Created on Apr 13, 2004
- Author:
- Jurgen Sladeczek (hjs)
For the latest info, please visit www.cs.duke.edu.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
networkStructure
protected EdgesWithCachedStatisticsI networkStructure
networkScore
protected double networkScore
searchLoopIndex
protected long searchLoopIndex
otherBayesNetStructure
protected BayesNetStructure otherBayesNetStructure
varCount
protected final int varCount
combinedParentCount
protected int combinedParentCount
combinedParentCountToCompareTo
protected int combinedParentCountToCompareTo
arrayOfParentCounts
protected int[] arrayOfParentCounts
arrayOfParentCountsToCompareTo
protected int[] arrayOfParentCountsToCompareTo
BayesNetStructure
public BayesNetStructure(BayesNetStructureI _bayesNetStructure,
double _networkScore,
long _searchLoopIndex)
throws java.lang.Exception
BayesNetStructure
public BayesNetStructure(EdgesWithCachedStatisticsI _networkStructure,
double _networkScore,
long _searchLoopIndex)
throws java.lang.Exception
assignBayesNetStructure
public void assignBayesNetStructure(EdgesI _networkStructure,
double _networkScore,
long _searchLoopIndex)
throws java.lang.Exception
- Specified by:
assignBayesNetStructure
in interface BayesNetStructureI
- Parameters:
_networkStructure
- The networkStructure (as set of edges) to assign._networkScore
- The score of the network._searchLoopIndex
- The search loop where the network was discovered.
- Throws:
java.lang.Exception
assignBayesNetStructure
public void assignBayesNetStructure(EdgesWithCachedStatisticsI _networkStructure,
double _networkScore,
long _searchLoopIndex)
throws java.lang.Exception
- Specified by:
assignBayesNetStructure
in interface BayesNetStructureI
- Throws:
java.lang.Exception
getNetworkStructure
public EdgesI getNetworkStructure()
- Specified by:
getNetworkStructure
in interface BayesNetStructureI
- Returns:
- Returns the networkStructure.
compareTo
public int compareTo(java.lang.Object otherStructure)
- Specified by:
compareTo
in interface java.lang.Comparable
toString
public java.lang.String toString()
- Specified by:
toString
in interface BayesNetStructureI
setNetworkStructure
public void setNetworkStructure(EdgesI networkStructure)
throws java.lang.Exception
- Specified by:
setNetworkStructure
in interface BayesNetStructureI
- Parameters:
networkStructure
- The networkStructure to set.
- Throws:
java.lang.Exception
getNetworkScore
public double getNetworkScore()
- Specified by:
getNetworkScore
in interface BayesNetStructureI
- Returns:
- Returns the networkScore.
setNetworkScore
public void setNetworkScore(double networkScore)
- Specified by:
setNetworkScore
in interface BayesNetStructureI
- Parameters:
networkScore
- The score (of the stored network) to set.
getSearchLoopIndex
public long getSearchLoopIndex()
- Specified by:
getSearchLoopIndex
in interface BayesNetStructureI
- Returns:
- Returns the searchLoopIndex.