edu.ucla.belief.rc2.kb
Class MultiValuedCNF

Object
  extended by MultiValuedCNF

public final class MultiValuedCNF
extends Object

Class representing Multi-Valued CNFs.

Author:
David Allen

Field Summary
 int[] clausesIndex
           
 boolean[] literalsPositive
           
 int[] literalsStates
           
 int[] literalsVars
           
 
Method Summary
 boolean augmentedForCompilation()
           
static void AugmentForCompilation(MultiValuedCNF mvcnf, BeliefNetwork bn, boolean useEClause)
          WARNING: This will add variables and adjust sizes, so it will no longer be "valid" with the BeliefNetwork passed in.
 boolean contains(Object var)
           
static MultiValuedCNF createFromBN(BeliefNetwork bn, MappedList vars)
          After calling this, the user should test unsatisfiable, before attempting to access the clause and literals arrays.
 void displayCNF(PrintStream out)
           
 List eclauses()
           
 List eclausesFV()
           
 Map fvToColOfClauses()
           
 List indexingList()
          This returns a list of all vars in the BN, not only those in the CNF.
 int numClauses()
           
 int numLiterals()
           
 int numVarsAppearingInCNF()
           
 boolean[] theseVarsAppearInCNF()
          Will return an array indexed by the vars list (from createFromBN), with true if it appears in any CNF clause and false if it doesn't appear anywhere.
 boolean unsatisfiable()
           
 boolean usingEClauses()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clausesIndex

public int[] clausesIndex

literalsVars

public int[] literalsVars

literalsStates

public int[] literalsStates

literalsPositive

public boolean[] literalsPositive
Method Detail

augmentedForCompilation

public boolean augmentedForCompilation()

usingEClauses

public boolean usingEClauses()

eclauses

public List eclauses()

eclausesFV

public List eclausesFV()

fvToColOfClauses

public Map fvToColOfClauses()

unsatisfiable

public boolean unsatisfiable()

contains

public boolean contains(Object var)

indexingList

public List indexingList()
This returns a list of all vars in the BN, not only those in the CNF.


createFromBN

public static MultiValuedCNF createFromBN(BeliefNetwork bn,
                                          MappedList vars)
After calling this, the user should test unsatisfiable, before attempting to access the clause and literals arrays. This function assumes that the CPT tables have probabilities in the range of [0..1] (i.e. they need to be normalized prior to calling this). The parameter vars should be the mapped list from the RC object, and will not be modified by this class (it however will be stored for later indexing purposes.)


theseVarsAppearInCNF

public boolean[] theseVarsAppearInCNF()
Will return an array indexed by the vars list (from createFromBN), with true if it appears in any CNF clause and false if it doesn't appear anywhere.


numVarsAppearingInCNF

public int numVarsAppearingInCNF()

numClauses

public int numClauses()

numLiterals

public int numLiterals()

displayCNF

public void displayCNF(PrintStream out)

AugmentForCompilation

public static void AugmentForCompilation(MultiValuedCNF mvcnf,
                                         BeliefNetwork bn,
                                         boolean useEClause)
WARNING: This will add variables and adjust sizes, so it will no longer be "valid" with the BeliefNetwork passed in.

This function is specific to the current method of encoding genetic networks!



Copyright 2010 UCLA Automated Reasoning Group