pt.tumba.ngram.bayes
Class SaveBugs

java.lang.Object
  extended by pt.tumba.ngram.bayes.SaveBugs

public class SaveBugs
extends java.lang.Object


Field Summary
(package private)  BayesNet bn
           
 
Constructor Summary
SaveBugs(BayesNet b_n)
          Default constructor for a SaveBUGS object.
 
Method Summary
private  void print_data_in(java.io.PrintStream pstream)
          Indicate which file contains the data; note that the data is appended to the given pstream, so this space is left to be filled by the user.
private  void save_data(java.io.PrintStream pstream)
          The numeric values for the distributions, saved in the Splus format understood by BUGS.
private  void save_model(java.io.PrintStream pstream)
          Save the name of the network in BUGS format.
private  void save_structure(java.io.PrintStream pstream)
          The parenthood relationships in the network.
private  void save_variables(java.io.PrintStream pstream)
          Declare all the variables used in the network.
 void save(java.io.PrintStream pstream)
          Save a BayesNet in a stream in the BUGS format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bn

BayesNet bn
Constructor Detail

SaveBugs

public SaveBugs(BayesNet b_n)
Default constructor for a SaveBUGS object.

Method Detail

save

public void save(java.io.PrintStream pstream)
Save a BayesNet in a stream in the BUGS format.


save_model

private void save_model(java.io.PrintStream pstream)
Save the name of the network in BUGS format.


save_variables

private void save_variables(java.io.PrintStream pstream)
Declare all the variables used in the network.


print_data_in

private void print_data_in(java.io.PrintStream pstream)
Indicate which file contains the data; note that the data is appended to the given pstream, so this space is left to be filled by the user.


save_structure

private void save_structure(java.io.PrintStream pstream)
The parenthood relationships in the network.


save_data

private void save_data(java.io.PrintStream pstream)
The numeric values for the distributions, saved in the Splus format understood by BUGS. Note that the user has to place this data in a separate file.