ve
Class DecisionNetworkFromCIspaceFormat

java.lang.Object
  |
  +--ve.DecisionNetwork
        |
        +--ve.DecisionNetworkFromCIspaceFormat
Direct Known Subclasses:
BeliefNetwork

public class DecisionNetworkFromCIspaceFormat
extends DecisionNetwork

A DecisionNetwork that is constructed from the CIspace format.


Fields inherited from class ve.DecisionNetwork
maxDomainSize, maxFactorSize, numProbFactors, numVariables, probFactors, stringToVar, variables
 
Constructor Summary
DecisionNetworkFromCIspaceFormat(java.lang.String s, int maxVariables)
          constructs a decision network from the extended CIspace representation.
DecisionNetworkFromCIspaceFormat(Variable[] vars, int numVars)
          constructs a belief network for the corresponding variables
 
Method Summary
private static boolean sorted(Variable[] varray)
          A new constructor that takes in a vector of different sorts of variables instead of a string representation.
protected  Variable[] stringToFamily(java.lang.String str, int index, int maxSize)
          given the string, return the family.
protected  Variable[] stringToParents(java.lang.String str, int index, int maxSize)
          given the string, return the parents.
private static java.lang.String[] stringToStringArray(java.lang.String str, int maxSize)
           
 
Methods inherited from class ve.DecisionNetwork
getNumProbFactors, getNumVariables, getProbFactors, getSize, getStringToVar, getVariables, mysort, print, printBrief
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

DecisionNetworkFromCIspaceFormat

public DecisionNetworkFromCIspaceFormat(Variable[] vars,
                                        int numVars)
constructs a belief network for the corresponding variables

DecisionNetworkFromCIspaceFormat

public DecisionNetworkFromCIspaceFormat(java.lang.String s,
                                        int maxVariables)
constructs a decision 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 decision network
maxVariables - the maximum number of variables allowed
Method Detail

sorted

private static boolean sorted(Variable[] varray)
A new constructor that takes in a vector of different sorts of variables instead of a string representation. Essentially a copy of the other constructor.

stringToStringArray

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

stringToFamily

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

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