org.encog.ml.bayesian.bif

## Class BIFUtil

- java.lang.Object
- - org.encog.ml.bayesian.bif.BIFUtil

-     public class BIFUtil
      extends Object

  A utility class to read and write Bayesian networks in BIF format. http://www.heatonresearch.com/wiki/Bayesian_Interchange_Format

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BIFUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `generateTable(BayesianEvent event)` Generate a table, in BIF format.
    `static BayesianNetwork` | `readBIF(File f)`
    `static BayesianNetwork` | `readBIF(InputStream is)` Read a BIF file from a stream.
    `static BayesianNetwork` | `readBIF(String f)` Read a BIF file.
    `static boolean` | `rollArgs(BayesianEvent event, int[] args)` Iterate through the event arguments in the BIF way, which is different than Encog's method.
    `static void` | `writeBIF(File file, BayesianNetwork network)` Write a Bayesian network to a BIF file.
    `static void` | `writeBIF(OutputStream os, BayesianNetwork network)` Write a Bayesian network to an output stream in BIF format.
    `static void` | `writeBIF(String fn, BayesianNetwork network)` Write a Bayesian network to BIF form.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BIFUtil

          public BIFUtil()

  - ### Method Detail

    - #### readBIF

          public static BayesianNetwork readBIF(String f)

      Read a BIF file.
      Parameters:
        `f` - The BIF file.
      Returns:
        The Bayesian network that was read.

    - #### readBIF

          public static BayesianNetwork readBIF(File f)

    - #### readBIF

          public static BayesianNetwork readBIF(InputStream is)

      Read a BIF file from a stream.
      Parameters:
        `is` - The stream to read from.
      Returns:
        The Bayesian network read.

    - #### writeBIF

          public static void writeBIF(String fn,
                      BayesianNetwork network)

      Write a Bayesian network to BIF form.
      Parameters:
        `fn` - The file name to save to.
        `network` - The network to save.

    - #### writeBIF

          public static void writeBIF(File file,
                      BayesianNetwork network)

      Write a Bayesian network to a BIF file.
      Parameters:
        `file` - The file to save to.
        `network` - The network to save.

    - #### writeBIF

          public static void writeBIF(OutputStream os,
                      BayesianNetwork network)

      Write a Bayesian network to an output stream in BIF format.
      Parameters:
        `os` - The output stream to write to.
        `network` - The network to write.

    - #### generateTable

          public static String generateTable(BayesianEvent event)

      Generate a table, in BIF format.
      Parameters:
        `event` - The event to write.
      Returns:
        The string form of the table.

    - #### rollArgs

          public static boolean rollArgs(BayesianEvent event,
                         int[] args)

      Iterate through the event arguments in the BIF way, which is different than Encog's method.
      Parameters:
        `event` - The event to save.
        `args` - The arguments.
      Returns:
        True if there is further to iterate.

Copyright © 2014. All Rights Reserved.