il2.inf.jointree
Enum Flavor

Object
  extended by Enum<Flavor>
      extended by Flavor
All Implemented Interfaces:
Serializable, Comparable<Flavor>

public enum Flavor
extends Enum<Flavor>

Join tree algorithm "flavor", ie distinctive implementation. Some flavors support partial derivatives, others do not. Call partials() to get the flavors that do.

Since:
20081029
Author:
keith cascio

Enum Constant Summary
hugin
          hugin, UnindexedHuginAlgorithm
shenoyshafer
          shenoy-shafer, UnindexedSSAlgorithm
ssnormalized
          shenoy-shafer -- normalized, NormalizedSSAlgorithm
ssnormalizedmax
          shenoy-shafer -- normalized, max-product, NormalizedMaxSSAlgorithm
zcnormalized
          "zero-conscious" hugin -- normalized, NormalizedZCAlgorithm
zeroconscioushugin
          "zero-conscious" hugin, UnindexedZCAlgorithm
 
Field Summary
 Class<? extends JoinTreeAlgorithm> clazz
          the implementation class
 Method method
          the implementation class's factory method
 boolean normalized
          computes the log of answers to avoid underflow
 boolean partial
          supports compiling a partial derivative engine ??
 
Method Summary
 JoinTreeAlgorithm compile(BayesianNetwork bn, EliminationOrders.JT jt)
          compile a JoinTreeAlgorithm JointEngine
static JoinTreeAlgorithm forClass(Class<? extends JoinTreeAlgorithm> clazz, BayesianNetwork bn, EliminationOrders.JT jt)
          convenience factory method
static Method linearSearch(Class<? extends JoinTreeAlgorithm> clazz)
          find the factory method for a particular class using linear search
static void main(String[] args)
          test/debug
static Method methodForClass(Class<? extends JoinTreeAlgorithm> clazz)
          find the factory method for a particular class, first using reflection, then linear search
static Method methodForClassSafe(Class<? extends JoinTreeAlgorithm> clazz)
          find the factory method for a particular class, but don't throw any exceptions if not found
static int MODIFIERS()
          modifiers of factory methods
static Collection<Flavor> normalized()
          the flavors that compute the log of answers to avoid underflow
static Class<?>[] PARAMETER_TYPES()
          parameter types of factory methods
 PartialDerivativeEngine partial(BayesianNetwork bn, EliminationOrders.JT jt)
          compile a partial derivative engine, if supported
static Collection<Flavor> partials()
          the flavors that support compiling a partial derivative engine
static Class<JoinTreeAlgorithm> RETURN_TYPE()
          return type of factory methods
static
<T> Class<? super T>
shallowestContiguousConcreteDeclarer(Class<T> child, String signature, Class<?>... parameterTypes)
          Beginning with child, considers the ancestry of child up to the first abstract ancestor.
static String STR_NAME_METHOD_NORMALIZED()
           
static String STR_NAME_METHOD()
          name factory methods
static Flavor valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Flavor[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ssnormalized

public static final Flavor ssnormalized
shenoy-shafer -- normalized, NormalizedSSAlgorithm


ssnormalizedmax

public static final Flavor ssnormalizedmax
shenoy-shafer -- normalized, max-product, NormalizedMaxSSAlgorithm


shenoyshafer

public static final Flavor shenoyshafer
shenoy-shafer, UnindexedSSAlgorithm


hugin

public static final Flavor hugin
hugin, UnindexedHuginAlgorithm


zcnormalized

public static final Flavor zcnormalized
"zero-conscious" hugin -- normalized, NormalizedZCAlgorithm


zeroconscioushugin

public static final Flavor zeroconscioushugin
"zero-conscious" hugin, UnindexedZCAlgorithm

Field Detail

clazz

public final Class<? extends JoinTreeAlgorithm> clazz
the implementation class


method

public final Method method
the implementation class's factory method


partial

public final boolean partial
supports compiling a partial derivative engine ??


normalized

public final boolean normalized
computes the log of answers to avoid underflow

Method Detail

values

public static Flavor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Flavor c : Flavor.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Flavor valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

partials

public static Collection<Flavor> partials()
the flavors that support compiling a partial derivative engine


normalized

public static Collection<Flavor> normalized()
the flavors that compute the log of answers to avoid underflow


partial

public PartialDerivativeEngine partial(BayesianNetwork bn,
                                       EliminationOrders.JT jt)
compile a partial derivative engine, if supported


compile

public JoinTreeAlgorithm compile(BayesianNetwork bn,
                                 EliminationOrders.JT jt)
compile a JoinTreeAlgorithm JointEngine


STR_NAME_METHOD_NORMALIZED

public static final String STR_NAME_METHOD_NORMALIZED()
Since:
20081103 method name that identifies a normalizing JointEngine implementation

STR_NAME_METHOD

public static final String STR_NAME_METHOD()
name factory methods


PARAMETER_TYPES

public static final Class<?>[] PARAMETER_TYPES()
parameter types of factory methods


RETURN_TYPE

public static final Class<JoinTreeAlgorithm> RETURN_TYPE()
return type of factory methods


MODIFIERS

public static final int MODIFIERS()
modifiers of factory methods


methodForClassSafe

public static Method methodForClassSafe(Class<? extends JoinTreeAlgorithm> clazz)
find the factory method for a particular class, but don't throw any exceptions if not found


linearSearch

public static Method linearSearch(Class<? extends JoinTreeAlgorithm> clazz)
                           throws NoSuchMethodException
find the factory method for a particular class using linear search

Throws:
NoSuchMethodException

methodForClass

public static Method methodForClass(Class<? extends JoinTreeAlgorithm> clazz)
                             throws NoSuchMethodException
find the factory method for a particular class, first using reflection, then linear search

Throws:
NoSuchMethodException

forClass

public static JoinTreeAlgorithm forClass(Class<? extends JoinTreeAlgorithm> clazz,
                                         BayesianNetwork bn,
                                         EliminationOrders.JT jt)
                                  throws NoSuchMethodException
convenience factory method

Throws:
NoSuchMethodException

shallowestContiguousConcreteDeclarer

public static <T> Class<? super T> shallowestContiguousConcreteDeclarer(Class<T> child,
                                                                        String signature,
                                                                        Class<?>... parameterTypes)
Beginning with child, considers the ancestry of child up to the first abstract ancestor. Return the shallowest non-abstract class in the contiguous concrete ancestry of child (including child itself) that declares a method named signature with parameters of types parameterTypes. If no such class exists, return null.

Since:
20081103

main

public static void main(String[] args)
test/debug



Copyright 2010 UCLA Automated Reasoning Group