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

## cve
Class ContextualBeliefNetwork

    java.lang.Object
      |
      +--cve.ContextualBeliefNetwork

Direct Known Subclasses:
  ContextualBeliefNetworkFromText, ContextualBeliefNetworkRandom, ContextualBeliefNetworkRandom2, ContextualBeliefNetworkRandom3

public class ContextualBeliefNetwork
extends java.lang.Object

A ContextualBeliefNetwork contains a tuple of `Variable`s (each with a domain) and a set of generalised rules (of the form `GenRule`).

Field Summary
`protected static int` | `maxContextSize`
`protected static int` | `maxDomainSize`
`protected static int` | `maxFactorSize`
`protected int` | `numVariables`
`protected RuleCollection` | `rules`
`protected java.util.Hashtable` | `stringToVar` maps the string name to the variable.
`protected Variable[]` | `variables`

Constructor Summary
`(package private)` | `ContextualBeliefNetwork()` dummy constructor.
`(package private)` | `ContextualBeliefNetwork(DecisionNetwork bn)` constructs a contextual belief network from a beleif network.
`(package private)` | `ContextualBeliefNetwork(DecisionNetwork bn, double threshold)` constructs a contextual belief network from a beleif network with the approximation given by threshold.

Method Summary
`void` | `add(GenRule rule)` add a new rule to the contextual belief network
`int` | `getNumSplitVars()` returns the number of variables that appear in splits.
`int` | `getNumVariables()`
`RuleCollection` | `getRules()`
`java.util.Hashtable` | `getStringToVar()` returns the map from the string name to the variable.
`Variable[]` | `getVariables()`
`void` | `print()` prints the contextual belief network
`void` | `printBrief()` prints a summary of the contextual belief network

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

Field Detail

### rules

    protected RuleCollection rules

### variables

    protected Variable[] variables

### numVariables

    protected int numVariables

### maxDomainSize

    protected static final int maxDomainSize

### maxFactorSize

    protected static final int maxFactorSize

### maxContextSize

    protected static final int maxContextSize

### stringToVar

    protected java.util.Hashtable stringToVar

  maps the string name to the variable.

Constructor Detail

### ContextualBeliefNetwork

    ContextualBeliefNetwork()

  dummy constructor. Does nothing.

### ContextualBeliefNetwork

    ContextualBeliefNetwork(DecisionNetwork bn)

  constructs a contextual belief network from a beleif network.

### ContextualBeliefNetwork

    ContextualBeliefNetwork(DecisionNetwork bn,
                            double threshold)

  constructs a contextual belief network from a beleif network with the approximation given by threshold.

Method Detail

### getRules

    public RuleCollection getRules()

### getVariables

    public Variable[] getVariables()

### getNumVariables

    public int getNumVariables()

### getStringToVar

    public java.util.Hashtable getStringToVar()

  returns the map from the string name to the variable.

### add

    public void add(GenRule rule)

  add a new rule to the contextual belief network

### print

    public void print()

  prints the contextual belief network

### printBrief

    public void printBrief()

  prints a summary of the contextual belief network

### getNumSplitVars

    public int getNumSplitVars()

  returns the number of variables that appear in splits. This is fewer than the number of splits as there can be some variables in more than one split.

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