edu.ucla.belief.recursiveconditioning
Class Settings

Object
  extended by Settings
All Implemented Interfaces:
CreationMethod.Settings, ChangeBroadcaster, UserObject

public class Settings
extends Object
implements UserObject, CreationMethod.Settings, ChangeBroadcaster

Since:
20030123
Author:
keith cascio

Nested Class Summary
static interface Settings.RCFactory
           
 
Field Summary
static Object[] ARRAY_CACHE_SCHEMES
           
static CachingDFBnB CACHE_SCHEME_DFBnB
           
static CachingUniform CACHE_SCHEME_UNIFORM
           
static double DOUBLE_BYTES_PER_BYTE
           
static double DOUBLE_HOURS_PER_MILLISECOND
           
static double DOUBLE_INVALID_OPTIMAL_MEMORY
           
static double DOUBLE_KILOBYTES_PER_BYTE
           
static double DOUBLE_MEGABYTES_PER_BYTE
           
static double DOUBLE_MINUTES_PER_MILLISECOND
           
static double DOUBLE_SECONDS_PER_MILLISECOND
           
 ChangeEvent EVENT_NEW_DTREE
           
 ChangeEvent EVENT_SETTING_CHANGED
           
static boolean FLAG_DEBUG_VERBOSE
           
static boolean FLAG_HMETIS_LOADED
           
static int INT_MINUTE_HOUR_THRESHOLD
           
static int INT_SECOND_MINUTE_THRESHOLD
           
static long LONG_BYTE_KILO_THRESHOLD
           
static long LONG_BYTES_PER_DOUBLE
           
static long LONG_KILO_MEGA_THRESHOLD
           
static String STR_BYTE_UNIT
           
static String STR_DEFAULT_RCFILEPATH
           
static String STR_HOURS_UNIT
           
static String STR_KILOBYTE_UNIT
           
static String STR_MEGABYTE_UNIT
           
static String STR_MINUTE_UNIT
           
static String STR_SECOND_UNIT
           
 
Constructor Summary
Settings()
           
 
Method Summary
 boolean addChangeListener(ChangeListener listener)
          interface ChangeBroadcaster
 boolean addNewDtreeListener(ChangeListener listener)
           
 Thread allocRCDgraphInThread(BeliefNetwork bn)
           
 Thread allocRCDtreeInThread(BeliefNetwork bn)
           
 void copy(Settings toCopy)
           
 Thread createRCDgraphInThread(BeliefNetwork bn)
           
 Thread createRCDgraphInThread(BeliefNetwork bn, DecompositionStructureUtils.ParamsGraph pgraph)
           
 Thread createRCDtreeInThread(BeliefNetwork bn)
           
 String describeUserMemConcise(Computation comp)
           
 String describeUserMemoryProportion()
           
 String describeUserMemoryProportion(Computation comp)
           
 Dtree doOpenDtree(BeliefNetwork bn, File fileSelected)
           
 boolean doOpenRC(BeliefNetwork bn, File fileSelected)
           
 void doSaveDtree(File fileSelected)
           
 boolean doSaveRC(Dtree dtree, RC toSave, Computation comp, File fileSelected, String networkName)
           
 boolean ensureRCExists(BeliefNetwork bn)
           
 ChangeBroadcaster fireNewDtree()
          interface ChangeBroadcaster
 ChangeBroadcaster fireSettingChanged()
          interface ChangeBroadcaster
static String[] formatMemoryNumbers(Computation comp, RC rc)
           
static String formatMemoryNumbersConcise(Computation comp, RC rc)
           
 Dtree generateDtree(BeliefNetwork bn)
           
 Object getBalanceFactor()
           
 Bundle getBundle()
           
 CachingScheme getCachingScheme()
           
 Dtree getDtree()
           
 int getDtreeHeight()
           
 int getDtreeMaxCluster()
           
 int getDtreeMaxContext()
           
 int getDtreeMaxCutset()
           
 CreationMethod getDtreeMethod()
           
 MethodHuginLog.Style getDtreeStyle()
           
 EliminationHeuristic getElimAlgo()
           
 MethodHmetis.Algorithm getHMeTiSAlgo()
           
static double getHoursPerRCCall()
           
 File getHuginLogFile()
           
 boolean getKeepBest()
           
static double getMinutesPerRCCall()
           
 int getNumDtrees()
           
 int getNumPartitions()
           
 RC getRC()
           
 RCComparator getRCComparator()
           
 CachingScheme.RCCreateListener getRCCreateListener()
           
 Settings.RCFactory getRCFactory()
           
static double getSecondsPerRCCall()
           
 String getTentativeHuginLogFilePath()
           
 boolean getUseKB()
           
 double getUserMemoryProportion()
           
 boolean isDtreeRequired()
           
 boolean isDtreeSettingChanged()
           
 UserObject onClone()
          interface UserObject
static Dtree openSamiamDtree(String strDtree, BeliefNetwork bn)
           
 boolean rcFromJT2(BeliefNetwork bn, BeliefCompilation comp)
           
 void refresh(RC rc)
           
 boolean removeChangeListener(ChangeListener listener)
          interface ChangeBroadcaster
 boolean removeNewDtreeListener(ChangeListener listener)
           
 Dtree selectBetterDtree(Dtree newDtree, Dtree oldDtree, Stats oldStats)
           
 void setBalanceFactor(Object balance)
           
 void setBundle(Bundle bundle)
           
 void setCachingScheme(CachingScheme cs)
           
 void setDebugID(String id)
           
 void setDtree(Dtree dtree)
           
 void setDtreeMethod(CreationMethod method)
           
 void setDtreeRequired(boolean flag)
           
 void setDtreeStyle(MethodHuginLog.Style style)
           
 void setElimAlgo(EliminationHeuristic ea)
           
 void setHMeTiSAlgo(MethodHmetis.Algorithm metisAlgo)
           
 void setHuginLogFile(File newFile)
           
 void setKeepBest(boolean flag)
           
static void setMillisPerRCCall(double millisPerRCCall)
           
 void setNumDtrees(int num)
           
 void setNumPartitions(int num)
           
 void setOutStream(PrintWriter writer)
           
 void setRC(RC rc)
           
 void setRC(RC rc, File fileSelected)
           
 void setRCComparator(RCComparator comp)
           
 void setRCCreateListener(CachingScheme.RCCreateListener list)
           
 void setRCFactory(Settings.RCFactory factory)
           
static void setSecondsPerRCCall(double secondsPerRCCall)
           
 void setTentativeHuginLogFilePath(String newPath)
           
 void setUseKB(boolean flag)
           
 boolean setUserMemoryProportion(double d)
           
 boolean setUserMemoryProportion(double d, boolean makeStale)
           
 String[] updateElapsedTimeDisplay(double milliseconds)
           
 String[] updateOptimalMemoryDisplay(Computation comp)
           
 String updateUserMemoryDisplay(Computation comp)
           
 String updateUserMemoryDisplay(Computation comp, double proportion)
           
 boolean validateDtree(BeliefNetwork bn)
           
 boolean validateRC(BeliefNetwork bn)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_DEBUG_VERBOSE

public static boolean FLAG_DEBUG_VERBOSE

EVENT_NEW_DTREE

public final ChangeEvent EVENT_NEW_DTREE

EVENT_SETTING_CHANGED

public final ChangeEvent EVENT_SETTING_CHANGED

LONG_BYTES_PER_DOUBLE

public static final long LONG_BYTES_PER_DOUBLE
See Also:
Constant Field Values

DOUBLE_INVALID_OPTIMAL_MEMORY

public static double DOUBLE_INVALID_OPTIMAL_MEMORY

INT_SECOND_MINUTE_THRESHOLD

public static final int INT_SECOND_MINUTE_THRESHOLD
See Also:
Constant Field Values

INT_MINUTE_HOUR_THRESHOLD

public static final int INT_MINUTE_HOUR_THRESHOLD
See Also:
Constant Field Values

STR_SECOND_UNIT

public static final String STR_SECOND_UNIT
See Also:
Constant Field Values

STR_MINUTE_UNIT

public static final String STR_MINUTE_UNIT
See Also:
Constant Field Values

STR_HOURS_UNIT

public static final String STR_HOURS_UNIT
See Also:
Constant Field Values

LONG_BYTE_KILO_THRESHOLD

public static final long LONG_BYTE_KILO_THRESHOLD
See Also:
Constant Field Values

LONG_KILO_MEGA_THRESHOLD

public static final long LONG_KILO_MEGA_THRESHOLD
See Also:
Constant Field Values

DOUBLE_BYTES_PER_BYTE

public static final double DOUBLE_BYTES_PER_BYTE
See Also:
Constant Field Values

DOUBLE_KILOBYTES_PER_BYTE

public static final double DOUBLE_KILOBYTES_PER_BYTE
See Also:
Constant Field Values

DOUBLE_MEGABYTES_PER_BYTE

public static final double DOUBLE_MEGABYTES_PER_BYTE
See Also:
Constant Field Values

STR_BYTE_UNIT

public static final String STR_BYTE_UNIT
See Also:
Constant Field Values

STR_KILOBYTE_UNIT

public static final String STR_KILOBYTE_UNIT
See Also:
Constant Field Values

STR_MEGABYTE_UNIT

public static final String STR_MEGABYTE_UNIT
See Also:
Constant Field Values

CACHE_SCHEME_UNIFORM

public static CachingUniform CACHE_SCHEME_UNIFORM

CACHE_SCHEME_DFBnB

public static CachingDFBnB CACHE_SCHEME_DFBnB

ARRAY_CACHE_SCHEMES

public static Object[] ARRAY_CACHE_SCHEMES

DOUBLE_SECONDS_PER_MILLISECOND

public static final double DOUBLE_SECONDS_PER_MILLISECOND
See Also:
Constant Field Values

DOUBLE_MINUTES_PER_MILLISECOND

public static final double DOUBLE_MINUTES_PER_MILLISECOND
See Also:
Constant Field Values

DOUBLE_HOURS_PER_MILLISECOND

public static final double DOUBLE_HOURS_PER_MILLISECOND
See Also:
Constant Field Values

STR_DEFAULT_RCFILEPATH

public static final String STR_DEFAULT_RCFILEPATH
See Also:
Constant Field Values

FLAG_HMETIS_LOADED

public static boolean FLAG_HMETIS_LOADED
Constructor Detail

Settings

public Settings()
Method Detail

onClone

public UserObject onClone()
interface UserObject

Specified by:
onClone in interface UserObject
Since:
20030314

getBundle

public Bundle getBundle()

setBundle

public void setBundle(Bundle bundle)
Since:
20030918

setOutStream

public void setOutStream(PrintWriter writer)
Since:
20030730

copy

public void copy(Settings toCopy)

setDebugID

public void setDebugID(String id)

addChangeListener

public boolean addChangeListener(ChangeListener listener)
interface ChangeBroadcaster

Specified by:
addChangeListener in interface ChangeBroadcaster

removeChangeListener

public boolean removeChangeListener(ChangeListener listener)
interface ChangeBroadcaster

Specified by:
removeChangeListener in interface ChangeBroadcaster

addNewDtreeListener

public boolean addNewDtreeListener(ChangeListener listener)

removeNewDtreeListener

public boolean removeNewDtreeListener(ChangeListener listener)

fireNewDtree

public ChangeBroadcaster fireNewDtree()
interface ChangeBroadcaster


fireSettingChanged

public ChangeBroadcaster fireSettingChanged()
interface ChangeBroadcaster

Specified by:
fireSettingChanged in interface ChangeBroadcaster

setMillisPerRCCall

public static void setMillisPerRCCall(double millisPerRCCall)

setSecondsPerRCCall

public static void setSecondsPerRCCall(double secondsPerRCCall)
Since:
20020813

getSecondsPerRCCall

public static double getSecondsPerRCCall()

getMinutesPerRCCall

public static double getMinutesPerRCCall()

getHoursPerRCCall

public static double getHoursPerRCCall()

setRCCreateListener

public void setRCCreateListener(CachingScheme.RCCreateListener list)

getRCCreateListener

public CachingScheme.RCCreateListener getRCCreateListener()

getDtree

public Dtree getDtree()

setDtree

public void setDtree(Dtree dtree)

getUseKB

public boolean getUseKB()

setUseKB

public void setUseKB(boolean flag)

setUserMemoryProportion

public boolean setUserMemoryProportion(double d)

setUserMemoryProportion

public boolean setUserMemoryProportion(double d,
                                       boolean makeStale)
Since:
20030702

getUserMemoryProportion

public double getUserMemoryProportion()

setRCFactory

public void setRCFactory(Settings.RCFactory factory)

getRCFactory

public Settings.RCFactory getRCFactory()

updateElapsedTimeDisplay

public String[] updateElapsedTimeDisplay(double milliseconds)

describeUserMemoryProportion

public String describeUserMemoryProportion()
Since:
20030218

describeUserMemoryProportion

public String describeUserMemoryProportion(Computation comp)

describeUserMemConcise

public String describeUserMemConcise(Computation comp)
Since:
20030707

formatMemoryNumbers

public static String[] formatMemoryNumbers(Computation comp,
                                           RC rc)
Since:
20030707

formatMemoryNumbersConcise

public static String formatMemoryNumbersConcise(Computation comp,
                                                RC rc)
Since:
20030707

updateOptimalMemoryDisplay

public String[] updateOptimalMemoryDisplay(Computation comp)

updateUserMemoryDisplay

public String updateUserMemoryDisplay(Computation comp)

updateUserMemoryDisplay

public String updateUserMemoryDisplay(Computation comp,
                                      double proportion)

createRCDtreeInThread

public Thread createRCDtreeInThread(BeliefNetwork bn)
Since:
20020807

allocRCDtreeInThread

public Thread allocRCDtreeInThread(BeliefNetwork bn)
Since:
20030606

createRCDgraphInThread

public Thread createRCDgraphInThread(BeliefNetwork bn)
Since:
20020807

createRCDgraphInThread

public Thread createRCDgraphInThread(BeliefNetwork bn,
                                     DecompositionStructureUtils.ParamsGraph pgraph)
Since:
20030929

allocRCDgraphInThread

public Thread allocRCDgraphInThread(BeliefNetwork bn)
Since:
20030606

getCachingScheme

public CachingScheme getCachingScheme()

setCachingScheme

public void setCachingScheme(CachingScheme cs)

rcFromJT2

public boolean rcFromJT2(BeliefNetwork bn,
                         BeliefCompilation comp)

validateRC

public boolean validateRC(BeliefNetwork bn)
Since:
20030606

ensureRCExists

public boolean ensureRCExists(BeliefNetwork bn)
Since:
20030606

validateDtree

public boolean validateDtree(BeliefNetwork bn)
Since:
20030214

selectBetterDtree

public Dtree selectBetterDtree(Dtree newDtree,
                               Dtree oldDtree,
                               Stats oldStats)
Since:
20020822

generateDtree

public Dtree generateDtree(BeliefNetwork bn)

doOpenDtree

public Dtree doOpenDtree(BeliefNetwork bn,
                         File fileSelected)
                  throws Exception
Throws:
Exception
Since:
20021213

setRC

public void setRC(RC rc)

setRC

public void setRC(RC rc,
                  File fileSelected)

refresh

public void refresh(RC rc)

getRC

public RC getRC()

doOpenRC

public boolean doOpenRC(BeliefNetwork bn,
                        File fileSelected)
Since:
012803

openSamiamDtree

public static Dtree openSamiamDtree(String strDtree,
                                    BeliefNetwork bn)
                             throws Exception
Throws:
Exception
Since:
20021213

doSaveDtree

public void doSaveDtree(File fileSelected)
Since:
20021213

doSaveRC

public boolean doSaveRC(Dtree dtree,
                        RC toSave,
                        Computation comp,
                        File fileSelected,
                        String networkName)
Since:
20030128

getDtreeHeight

public int getDtreeHeight()

getDtreeMaxCluster

public int getDtreeMaxCluster()

getDtreeMaxCutset

public int getDtreeMaxCutset()

getDtreeMaxContext

public int getDtreeMaxContext()

isDtreeSettingChanged

public boolean isDtreeSettingChanged()
Since:
20030214

isDtreeRequired

public boolean isDtreeRequired()
Since:
20030513

setDtreeRequired

public void setDtreeRequired(boolean flag)
Since:
20030513

getRCComparator

public RCComparator getRCComparator()

setRCComparator

public void setRCComparator(RCComparator comp)

getKeepBest

public boolean getKeepBest()

setKeepBest

public void setKeepBest(boolean flag)

getDtreeMethod

public CreationMethod getDtreeMethod()

setDtreeMethod

public void setDtreeMethod(CreationMethod method)

getDtreeStyle

public MethodHuginLog.Style getDtreeStyle()
Specified by:
getDtreeStyle in interface CreationMethod.Settings

setDtreeStyle

public void setDtreeStyle(MethodHuginLog.Style style)

getHuginLogFile

public File getHuginLogFile()
Specified by:
getHuginLogFile in interface CreationMethod.Settings

setHuginLogFile

public void setHuginLogFile(File newFile)
Specified by:
setHuginLogFile in interface CreationMethod.Settings

getTentativeHuginLogFilePath

public String getTentativeHuginLogFilePath()
Specified by:
getTentativeHuginLogFilePath in interface CreationMethod.Settings

setTentativeHuginLogFilePath

public void setTentativeHuginLogFilePath(String newPath)

getElimAlgo

public EliminationHeuristic getElimAlgo()
Specified by:
getElimAlgo in interface CreationMethod.Settings

setElimAlgo

public void setElimAlgo(EliminationHeuristic ea)

getHMeTiSAlgo

public MethodHmetis.Algorithm getHMeTiSAlgo()
Specified by:
getHMeTiSAlgo in interface CreationMethod.Settings

setHMeTiSAlgo

public void setHMeTiSAlgo(MethodHmetis.Algorithm metisAlgo)

getNumDtrees

public int getNumDtrees()
Specified by:
getNumDtrees in interface CreationMethod.Settings

setNumDtrees

public void setNumDtrees(int num)

getNumPartitions

public int getNumPartitions()
Specified by:
getNumPartitions in interface CreationMethod.Settings

setNumPartitions

public void setNumPartitions(int num)

getBalanceFactor

public Object getBalanceFactor()
Specified by:
getBalanceFactor in interface CreationMethod.Settings

setBalanceFactor

public void setBalanceFactor(Object balance)


Copyright 2010 UCLA Automated Reasoning Group