cve
Class ContextualBeliefNetworkFromText

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

public class ContextualBeliefNetworkFromText
extends ContextualBeliefNetwork

The class of ContextualBeliefNetworks constructed from an extended CIspace representation.


Fields inherited from class cve.ContextualBeliefNetwork
maxContextSize, maxDomainSize, maxFactorSize, numVariables, rules, stringToVar, variables
 
Constructor Summary
(package private) ContextualBeliefNetworkFromText(java.lang.String s, int maxVariables)
          constructs a belief network from the extended CIspace representation.
 
Method Summary
protected static boolean sorted(Variable[] varray)
           
protected  Context stringToContext(java.lang.String str, int maxSize)
          given the string, return the parents
protected  Variable[] stringToParents(java.lang.String str, int index, int maxSize)
          given the string, return the parents
protected static java.lang.String[] stringToStringArray(java.lang.String str, int maxSize)
           
 
Methods inherited from class cve.ContextualBeliefNetwork
add, getNumSplitVars, getNumVariables, getRules, getStringToVar, getVariables, print, printBrief
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

ContextualBeliefNetworkFromText

ContextualBeliefNetworkFromText(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
Method Detail

sorted

protected static boolean sorted(Variable[] varray)

stringToStringArray

protected static java.lang.String[] stringToStringArray(java.lang.String str,
                                                        int maxSize)

stringToParents

protected Variable[] stringToParents(java.lang.String str,
                                     int index,
                                     int maxSize)
given the string, return the parents
Parameters:
str - the string containing the parents' index or name
index - the index of the current variable
maxSize - the maximum factor size

stringToContext

protected Context stringToContext(java.lang.String str,
                                  int maxSize)
given the string, return the parents
Parameters:
str - the string containing the parents' index or name
index - the index of the current variable
maxSize - the maximum factor size