stochasticsampling
Class ImportanceSampling

java.lang.Object
  |
  +--stochasticsampling.ImportanceSampling
All Implemented Interfaces:
ImportanceInterface
Direct Known Subclasses:
AdaptiveAndSelfIS, ForwardSampling, LogicSampling

public abstract class ImportanceSampling
extends java.lang.Object
implements ImportanceInterface

Title: ImportanceSampling.java Description: Stochastic sampling base class Copyright: Copyright (c) 2001 Company: KSU / KDD


Constructor Summary
ImportanceSampling()
           
 
Method Summary
 void generateAllSamples()
          generateAllSamples generates m samples of the selected sampling type
 java.util.Vector generateSample(NodeManager nodemanager, BBN network)
          generateSample generates a sample of the selected sampling type
 java.util.Vector generateSample(NodeManager nodemanager, BBN network, java.util.Vector[] ICPT)
          generateSample generates a sample of the selected sampling type
 BBN reorder(BBN allnodeslist)
          reorder switches around the nodes in BBN so that the root nodes always appear before the branch nodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportanceSampling

public ImportanceSampling()
Method Detail

generateAllSamples

public void generateAllSamples()
                        throws java.io.IOException
generateAllSamples generates m samples of the selected sampling type

generateSample

public java.util.Vector generateSample(NodeManager nodemanager,
                                       BBN network)
generateSample generates a sample of the selected sampling type
Specified by:
generateSample in interface ImportanceInterface
Parameters:
nodemanager - - a copy of the NodeManager
network - - the Bayesian network
Returns:
Vector - the generated sample

generateSample

public java.util.Vector generateSample(NodeManager nodemanager,
                                       BBN network,
                                       java.util.Vector[] ICPT)
generateSample generates a sample of the selected sampling type
Specified by:
generateSample in interface ImportanceInterface
Parameters:
nodemanager - - a copy of the NodeManager
network - - the Bayesian network
ICPT - - an array of vectors of the ICPT entries (for AIS and SIS only)
Returns:
Vector - the generated sample

reorder

public BBN reorder(BBN allnodeslist)
reorder switches around the nodes in BBN so that the root nodes always appear before the branch nodes
Specified by:
reorder in interface ImportanceInterface
Parameters:
allnodeslist - - the BBN in its original order
Returns:
BBN - the reordered BBN