Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ve
Class BeliefNetwork

    java.lang.Object
      |
      +--ve.BeliefNetwork

Direct Known Subclasses:
  BeliefNetFromCBN

public class BeliefNetwork
extends java.lang.Object

A BeliefNetwork contains a tuple of Variables (each with a domain) and a set of conditional probability tables, here represented as a `FactorCPT`.

Field Summary
`protected int` | `numVariables`
`protected Factor[]` | `probFactors` The conditional probability tables asssociated with the variables.

Constructor Summary
`BeliefNetwork(java.lang.String s, int maxVariables)` constructs a belief network from the extended CIspace representation.
`BeliefNetwork(Variable[] vars, int numVars)` constructs a belief network for the corresponding variables

Method Summary
`int` | `getNumVariables()`
`Factor[]` | `getProbFactors()` return the conditiona probability tables asssociates with the variables.
`java.util.HashMap` | `getStringToVar()` returns the map from the string name to the variable.
`Variable[]` | `getVariables()` get the variables of the belief network, in order.
`void` | `print()` Prints the belief network

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### probFactors

    protected Factor[] probFactors

  The conditional probability tables asssociated with the variables. The factor associated with probabilityFactors[i] represents the conditional probability table of variables[i].

### numVariables

    protected int numVariables

Constructor Detail

### BeliefNetwork

    public BeliefNetwork(java.lang.String s,
                         int maxVariables)

  constructs a belief network from the extended CIspace representation. The extended representation lets us have indexes or names as the parents. It assumes that the names are not numbers (otherwise it assumes they are the indexes).
  Parameters:
    `s` - string representation of the belief network
    `maxVariables` - the maximum number of variables allowed

### BeliefNetwork

    public BeliefNetwork(Variable[] vars,
                         int numVars)

  constructs a belief network for the corresponding variables

Method Detail

### getVariables

    public Variable[] getVariables()

  get the variables of the belief network, in order. The ordering of indexes to that array should be consistent with the ordering of the variables, but the indexes don't have to coincide with the IDs of the variables. The value variable.length does not give the actual number of variables; use getNumVariables to determine the number of variables.

### getProbFactors

    public Factor[] getProbFactors()

  return the conditiona probability tables asssociates with the variables. The factor associated with probabilityFactors[i] represents the conditional probability table of variables[i].

### getNumVariables

    public int getNumVariables()

### getStringToVar

    public java.util.HashMap getStringToVar()

  returns the map from the string name to the variable.

### print

    public void print()

  Prints the belief network

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD