edu.ucla.util.code
Class Test

Object
  extended by Test

public class Test
extends Object

Tests each of the CodeGenius sub classes by writing one or more Java files intended to be compiled and run.

Since:
021005
Author:
Keith Cascio

Field Summary
 Map arguments
           
static String[] ARRAY_DYNAMATOR_CLASSNAMES
           
static String[] ARRAY_FLAGS
           
 BeliefNetwork bn
           
 Map evidence
           
 Set evidenceComplement
           
 File fileClassFileNames
           
 File fileJavaFileNames
           
 File inputFile
           
 List listClassFileNames
           
 List listJavaFileNames
           
 Random random
           
static Random RANDOM
           
 int sizeNetwork
           
static String STR_FILENAME_CLASSFILELIST
           
static String STR_FILENAME_JAVAFILELIST
           
static String STR_FLAG_EM_DATA_FILE
           
static String STR_FLAG_MINUS
           
static String STR_FLAG_NETWORK_FILE
           
static String STR_FLAG_PLUS
           
 
Constructor Summary
Test(Map arguments)
           
 
Method Summary
static Dynamator dynamatorForClass(String className)
           
static int fail(String message, Throwable throwable)
           
 Random getRandom()
           
static Random getRandomStatic()
           
 void init()
           
static void main(String[] args)
           
static Object randomElement(Collection collection)
           
static Object randomElement(Object[] array)
           
 void randomEvidence()
           
static Set randomSubset(Collection superset, double fraction)
           
 boolean shouldRun(String classname)
           
 void testCPTCoder()
           
 void testEMCoder()
           
 void testMAPCoder()
           
 void testModelCoder()
           
 void testMPECoder()
           
 void testProbabilityQueryCoder()
           
 void testRoot(File ifile)
           
 void testSensitivityCoder()
           
 void writeCode(CodeGenius genius, String className)
           
 void writeFileList(List list, File file)
           
 void writeFileLists()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_FLAG_NETWORK_FILE

public static final String STR_FLAG_NETWORK_FILE
See Also:
Constant Field Values

STR_FLAG_EM_DATA_FILE

public static final String STR_FLAG_EM_DATA_FILE
See Also:
Constant Field Values

STR_FLAG_MINUS

public static final String STR_FLAG_MINUS
See Also:
Constant Field Values

STR_FLAG_PLUS

public static final String STR_FLAG_PLUS
See Also:
Constant Field Values

ARRAY_FLAGS

public static final String[] ARRAY_FLAGS

STR_FILENAME_JAVAFILELIST

public static final String STR_FILENAME_JAVAFILELIST
See Also:
Constant Field Values

STR_FILENAME_CLASSFILELIST

public static final String STR_FILENAME_CLASSFILELIST
See Also:
Constant Field Values

ARRAY_DYNAMATOR_CLASSNAMES

public static final String[] ARRAY_DYNAMATOR_CLASSNAMES
Since:
20100108

RANDOM

public static Random RANDOM

arguments

public Map arguments

inputFile

public File inputFile

bn

public BeliefNetwork bn

sizeNetwork

public int sizeNetwork

evidence

public Map evidence

evidenceComplement

public Set evidenceComplement

listJavaFileNames

public List listJavaFileNames

listClassFileNames

public List listClassFileNames

fileJavaFileNames

public File fileJavaFileNames

fileClassFileNames

public File fileClassFileNames

random

public Random random
Constructor Detail

Test

public Test(Map arguments)
Method Detail

main

public static void main(String[] args)

testRoot

public void testRoot(File ifile)
              throws Exception
Throws:
Exception

shouldRun

public boolean shouldRun(String classname)

init

public void init()
          throws Exception
Throws:
Exception

testEMCoder

public void testEMCoder()
                 throws Exception
Throws:
Exception

testMAPCoder

public void testMAPCoder()
                  throws Exception
Throws:
Exception

testCPTCoder

public void testCPTCoder()
                  throws Exception
Throws:
Exception

testModelCoder

public void testModelCoder()
                    throws Exception
Throws:
Exception

testMPECoder

public void testMPECoder()
                  throws Exception
Throws:
Exception

dynamatorForClass

public static Dynamator dynamatorForClass(String className)
Since:
20100108

testProbabilityQueryCoder

public void testProbabilityQueryCoder()
                               throws Exception
Throws:
Exception

testSensitivityCoder

public void testSensitivityCoder()
                          throws Exception
Throws:
Exception

writeCode

public void writeCode(CodeGenius genius,
                      String className)
               throws Exception
Throws:
Exception

getRandom

public Random getRandom()

getRandomStatic

public static Random getRandomStatic()

writeFileLists

public void writeFileLists()
                    throws Exception
Throws:
Exception

writeFileList

public void writeFileList(List list,
                          File file)
                   throws Exception
Throws:
Exception

randomEvidence

public void randomEvidence()

randomSubset

public static Set randomSubset(Collection superset,
                               double fraction)

randomElement

public static Object randomElement(Collection collection)

randomElement

public static Object randomElement(Object[] array)

fail

public static int fail(String message,
                       Throwable throwable)


Copyright 2010 UCLA Automated Reasoning Group