/** * When this class is loaded, preload the cache with a few items which we think will often be * needed. This can avoid the necessity of running a belief network context in simple problems. */ static { System.err.println("PiHelperLoader.static: preload the helper cache."); helper_cache = new Hashtable(); Vector seq = new Vector(); seq.addElement(riso.distributions.ConditionalDiscrete.class); seq.addElement(riso.distributions.Discrete.class); helper_cache.put( new HelperCacheKey("pi", seq), riso.distributions.computes_pi.ConditionalDiscrete_Discrete.class); seq = new Vector(); seq.addElement(riso.distributions.Discrete.class); helper_cache.put( new HelperCacheKey("lambda", seq), riso.distributions.computes_lambda.Discrete.class); seq = new Vector(); seq.addElement(riso.distributions.AbstractDistribution.class); seq.addElement(riso.distributions.AbstractDistribution.class); helper_cache.put( new HelperCacheKey("pi_message", seq), riso.distributions.computes_pi_message.AbstractDistribution_AbstractDistribution.class); seq = new Vector(); seq.addElement(riso.distributions.ConditionalDiscrete.class); seq.addElement(riso.distributions.Discrete.class); seq.addElement(riso.distributions.Discrete.class); helper_cache.put( new HelperCacheKey("lambda_message", seq), riso.distributions.computes_lambda_message.ConditionalDiscrete_Discrete_Discrete.class); seq = new Vector(); seq.addElement(riso.distributions.ConditionalDiscrete.class); seq.addElement(riso.distributions.Discrete.class); helper_cache.put( new HelperCacheKey("lambda_message", seq), riso.distributions.computes_lambda_message.ConditionalDiscrete_Discrete_.class); seq = new Vector(); seq.addElement(riso.distributions.Discrete.class); seq.addElement(riso.distributions.Discrete.class); helper_cache.put( new HelperCacheKey("posterior", seq), riso.distributions.computes_posterior.Discrete_Discrete.class); System.err.println("PiHelperLoader.static: helper_cache.size(): " + helper_cache.size()); }