Esempio n. 1
0
 /** Construct a BayesNet from a textual description in a string. */
 public BayesNet(String s) throws IFException {
   this();
   StringBufferInputStream istream = new StringBufferInputStream(s);
   // Read the BayesNet from the stream
   InterchangeFormat ifo = new InterchangeFormat(istream);
   ifo.CompilationUnit();
   // Transfer information from the parser
   translate(ifo);
 }
Esempio n. 2
0
 /** Construct a BayesNet from a textual description in an URL. */
 public BayesNet(URL url) throws IFException, IOException {
   this();
   InputStream istream = url.openStream();
   // Read the BayesNet from the stream
   InterchangeFormat ifo = new InterchangeFormat(istream);
   ifo.CompilationUnit();
   // Now transfer information from the parser
   translate(ifo);
   istream.close();
 }