context: using System;
  using MicrosoftResearch.Infer;
  using MicrosoftResearch.Infer.Distributions;
  using MicrosoftResearch.Infer.Collections;
  using MicrosoftResearch.Infer.Factors;
  
  namespace MicrosoftResearch.Infer.Models.User
  {
  	/// <summary>
  	/// Class for performing inference in model 'Model' using algorithm 'ExpectationPropagation'.
  	/// </summary>
  	/// <remarks>
  	/// The easiest way to use this class is to wrap an instance in a CompiledAlgorithm object and use
  	/// the methods on CompiledAlgorithm to set parameters and execute inference.
  	/// 
  	/// If you instead wish to use this class directly, you must perform the following steps:
  	/// 1) Create an instance of the class
  	/// 2) Set the value of any externally-set fields e.g. data, priors
  	/// 3) Call the Reset() method
  	/// 4) Call the Initialise() method once
  	/// 5) Call the Update() method multiple times  - each call performs one iteration of inference
  	/// 6) Use the XXXMarginal() methods to retrieve posterior marginals for different variables.
  	/// 
  	/// Generated by Infer.NET 2.3 beta 4 at 19:26 on 29 May 2010.
  	/// </remarks>
  	public class Model42_EP : IIterativeProcess
  	{
  		#region Fields
  		// Messages from uses of 'vbool96'
  		public Bernoulli[] vbool96_uses_B;
  		// The constant 'vBernoulli104'
  		public Bernoulli vBernoulli104;
  		// Message from definition of 'vbool96'
  		public Bernoulli vbool96_F;
  		// Messages from uses of 'vbool119'
  		public Bernoulli[] vbool119_uses_B;
  		// The constant 'vBernoulli127'
  		public Bernoulli vBernoulli127;
  		// Message from definition of 'vbool119'
  		public Bernoulli vbool119_F;
  		// Messages from uses of 'vbool340'
  		public Bernoulli[] vbool340_uses_B;
  		// Message from definition of 'vbool340'
  		public Bernoulli vbool340_F;
  		// Messages from uses of 'vbool174'
  		public Bernoulli[] vbool174_uses_B;
  		// The constant 'vBernoulli182'
  		public Bernoulli vBernoulli182;
  		// Message from definition of 'vbool174'
  		public Bernoulli vbool174_F;
  		// Messages from uses of 'vbool465'
  		public Bernoulli[] vbool465_uses_B;
  		// Message from definition of 'vbool465'
  		public Bernoulli vbool465_F;
  		// Messages from uses of 'vbool135'
  		public Bernoulli[] vbool135_uses_B;
  		// The constant 'vBernoulli143'
  		public Bernoulli vBernoulli143;
  		// Message from definition of 'vbool135'
  		public Bernoulli vbool135_F;
  		// Messages from uses of 'vbool348'
  		public Bernoulli[] vbool348_uses_B;
  		// Message from definition of 'vbool348'
  		public Bernoulli vbool348_F;
  		// Messages from uses of 'vbool166'
  		public Bernoulli[] vbool166_uses_B;
  		// The constant 'vBernoulli174'
  		public Bernoulli vBernoulli174;
  		// Message from definition of 'vbool166'
  		public Bernoulli vbool166_F;
  		// Messages from uses of 'vbool437'
  		public Bernoulli[] vbool437_uses_B;
  		// Message from definition of 'vbool437'
  		public Bernoulli vbool437_F;
  		// Messages from uses of 'vbool127'
  		public Bernoulli[] vbool127_uses_B;
  		// The constant 'vBernoulli135'
  		public Bernoulli vBernoulli135;
  		// Message from definition of 'vbool127'
  		public Bernoulli vbool127_F;
  		// Messages from uses of 'vbool356'
  		public Bernoulli[] vbool356_uses_B;
  		// Message from definition of 'vbool356'
  		public Bernoulli vbool356_F;
  		// Messages from uses of 'vbool23'
  		public Bernoulli[] vbool23_uses_B;
  		// The constant 'vBernoulli31'
  		public Bernoulli vBernoulli31;
  		// Message from definition of 'vbool23'
  		public Bernoulli vbool23_F;
  		// Messages from uses of 'vbool364'
  		public Bernoulli[] vbool364_uses_B;
  		// Message from definition of 'vbool364'
  		public Bernoulli vbool364_F;
  		// Messages from uses of 'vbool148'
  		public Bernoulli[] vbool148_uses_B;
  		// The constant 'vBernoulli156'
  		public Bernoulli vBernoulli156;
  		// Message from definition of 'vbool148'
  		public Bernoulli vbool148_F;
  		// Messages from uses of 'vbool429'
  		public Bernoulli[] vbool429_uses_B;
  		// Message from definition of 'vbool429'
  		public Bernoulli vbool429_F;
  		// Messages from uses of 'vbool57'
  		public Bernoulli[] vbool57_uses_B;
  		// The constant 'vBernoulli65'
  		public Bernoulli vBernoulli65;
  		// Message from definition of 'vbool57'
  		public Bernoulli vbool57_F;
  		// Messages from uses of 'vbool324'
  		public Bernoulli[] vbool324_uses_B;
  		// Message from definition of 'vbool324'
  		public Bernoulli vbool324_F;
  		// Messages from uses of 'vbool31'
  		public Bernoulli[] vbool31_uses_B;
  		// The constant 'vBernoulli39'
  		public Bernoulli vBernoulli39;
  		// Message from definition of 'vbool31'
  		public Bernoulli vbool31_F;
  		// Messages from uses of 'vbool300'
  		public Bernoulli[] vbool300_uses_B;
  		// Message from definition of 'vbool300'
  		public Bernoulli vbool300_F;
  		// Messages from uses of 'vbool83'
  		public Bernoulli[] vbool83_uses_B;
  		// The constant 'vBernoulli91'
  		public Bernoulli vBernoulli91;
  		// Message from definition of 'vbool83'
  		public Bernoulli vbool83_F;
  		// Messages from uses of 'vbool466'
  		public Bernoulli[] vbool466_uses_B;
  		// Message from definition of 'vbool466'
  		public Bernoulli vbool466_F;
  		// Messages from uses of 'vbool49'
  		public Bernoulli[] vbool49_uses_B;
  		// The constant 'vBernoulli57'
  		public Bernoulli vBernoulli57;
  		// Message from definition of 'vbool49'
  		public Bernoulli vbool49_F;
  		// Messages from uses of 'vbool308'
  		public Bernoulli[] vbool308_uses_B;
  		// Message from definition of 'vbool308'
  		public Bernoulli vbool308_F;
  		// Messages from uses of 'vbool75'
  		public Bernoulli[] vbool75_uses_B;
  		// The constant 'vBernoulli83'
  		public Bernoulli vBernoulli83;
  		// Message from definition of 'vbool75'
  		public Bernoulli vbool75_F;
  		// Messages from uses of 'vbool316'
  		public Bernoulli[] vbool316_uses_B;
  		// Message from definition of 'vbool316'
  		public Bernoulli vbool316_F;
  		// Messages from uses of 'vbool332'
  		public Bernoulli[] vbool332_uses_B;
  		// Message from definition of 'vbool332'
  		public Bernoulli vbool332_F;
  		// Messages from uses of 'vbool5'
  		public Bernoulli[] vbool5_uses_B;
  		// The constant 'vBernoulli13'
  		public Bernoulli vBernoulli13;
  		// Message from definition of 'vbool5'
  		public Bernoulli vbool5_F;
  		// Messages from uses of 'vbool292'
  		public Bernoulli[] vbool292_uses_B;
  		// Message from definition of 'vbool292'
  		public Bernoulli vbool292_F;
  		// Message to definition of 'vbool340'
  		public Bernoulli vbool340_B;
  		// Messages to uses of 'vbool119'
  		public Bernoulli[] vbool119_uses_F;
  		// Message to definition of 'vbool465'
  		public Bernoulli vbool465_B;
  		// Messages to uses of 'vbool174'
  		public Bernoulli[] vbool174_uses_F;
  		// Messages to uses of 'vbool96'
  		public Bernoulli[] vbool96_uses_F;
  		// Message to definition of 'vbool348'
  		public Bernoulli vbool348_B;
  		// Messages to uses of 'vbool135'
  		public Bernoulli[] vbool135_uses_F;
  		// The constant 'vBernoulli5'
  		public Bernoulli vBernoulli5;
  		// Message to definition of 'vbool437'
  		public Bernoulli vbool437_B;
  		// Messages to uses of 'vbool166'
  		public Bernoulli[] vbool166_uses_F;
  		// The constant 'vBernoulli6'
  		public Bernoulli vBernoulli6;
  		// Message to definition of 'vbool356'
  		public Bernoulli vbool356_B;
  		// Messages to uses of 'vbool127'
  		public Bernoulli[] vbool127_uses_F;
  		// Message to definition of 'vbool364'
  		public Bernoulli vbool364_B;
  		// Messages to uses of 'vbool23'
  		public Bernoulli[] vbool23_uses_F;
  		// Message to definition of 'vbool429'
  		public Bernoulli vbool429_B;
  		// Messages to uses of 'vbool148'
  		public Bernoulli[] vbool148_uses_F;
  		// Message to definition of 'vbool324'
  		public Bernoulli vbool324_B;
  		// Messages to uses of 'vbool57'
  		public Bernoulli[] vbool57_uses_F;
  		// Message to definition of 'vbool300'
  		public Bernoulli vbool300_B;
  		// Messages to uses of 'vbool31'
  		public Bernoulli[] vbool31_uses_F;
  		// Message to definition of 'vbool466'
  		public Bernoulli vbool466_B;
  		// Messages to uses of 'vbool83'
  		public Bernoulli[] vbool83_uses_F;
  		// Message to definition of 'vbool308'
  		public Bernoulli vbool308_B;
  		// Messages to uses of 'vbool49'
  		public Bernoulli[] vbool49_uses_F;
  		// Message to definition of 'vbool316'
  		public Bernoulli vbool316_B;
  		// Messages to uses of 'vbool75'
  		public Bernoulli[] vbool75_uses_F;
  		// Message to definition of 'vbool332'
  		public Bernoulli vbool332_B;
  		// Message to definition of 'vbool292'
  		public Bernoulli vbool292_B;
  		// Messages to uses of 'vbool5'
  		public Bernoulli[] vbool5_uses_F;
  		// Message to marginal of 'vbool340'
  		public Bernoulli vbool340_marginal_B;
  		// Message to marginal of 'vbool465'
  		public Bernoulli vbool465_marginal_B;
  		// Message to marginal of 'vbool348'
  		public Bernoulli vbool348_marginal_B;
  		// Message to marginal of 'vbool437'
  		public Bernoulli vbool437_marginal_B;
  		// Message to marginal of 'vbool356'
  		public Bernoulli vbool356_marginal_B;
  		// Message to marginal of 'vbool364'
  		public Bernoulli vbool364_marginal_B;
  		// Message to marginal of 'vbool429'
  		public Bernoulli vbool429_marginal_B;
  		// Message to marginal of 'vbool324'
  		public Bernoulli vbool324_marginal_B;
  		// Message to marginal of 'vbool300'
  		public Bernoulli vbool300_marginal_B;
  		// Message to marginal of 'vbool466'
  		public Bernoulli vbool466_marginal_B;
  		// Message to marginal of 'vbool308'
  		public Bernoulli vbool308_marginal_B;
  		// Message to marginal of 'vbool316'
  		public Bernoulli vbool316_marginal_B;
  		// Message to marginal of 'vbool332'
  		public Bernoulli vbool332_marginal_B;
  		// Message to marginal of 'vbool292'
  		public Bernoulli vbool292_marginal_B;
  		// Message to marginal of 'vbool96'
  		public Bernoulli vbool96_marginal_B;
  		// Message to marginal of 'vbool119'
  		public Bernoulli vbool119_marginal_B;
  		// Message to marginal of 'vbool174'
  		public Bernoulli vbool174_marginal_B;
  		// Message to marginal of 'vbool135'
  		public Bernoulli vbool135_marginal_B;
  		// Message to marginal of 'vbool166'
  		public Bernoulli vbool166_marginal_B;
  		// Message to marginal of 'vbool127'
  		public Bernoulli vbool127_marginal_B;
  		// Message to marginal of 'vbool23'
  		public Bernoulli vbool23_marginal_B;
  		// Message to marginal of 'vbool148'
  		public Bernoulli vbool148_marginal_B;
  		// Message to marginal of 'vbool57'
  		public Bernoulli vbool57_marginal_B;
  		// Message to marginal of 'vbool31'
  		public Bernoulli vbool31_marginal_B;
  		// Message to marginal of 'vbool83'
  		public Bernoulli vbool83_marginal_B;
  		// Message to marginal of 'vbool49'
  		public Bernoulli vbool49_marginal_B;
  		// Message to marginal of 'vbool75'
  		public Bernoulli vbool75_marginal_B;
  		// Message to marginal of 'vbool5'
  		public Bernoulli vbool5_marginal_B;
  		#endregion
  
  		#region Methods
  		/// <summary>
  		/// Configures constant values that will not change during the lifetime of the class.
  		/// </summary>
  		/// <remarks>
  		/// This method should be called once only after the class is instantiated.  In future, it will likely become
  		/// the class constructor.
  		/// </remarks>
  		public void Reset()
  		{
  			// Create array for 'vbool96_uses' backwards messages.
  			this.vbool96_uses_B = new Bernoulli[2];
  			this.vBernoulli104 = new Bernoulli(0.01);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool96_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli104);
  			}
  			this.vbool96_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli104);
  			// Message to 'vbool96' from Random factor
  			this.vbool96_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli104);
  			// Create array for 'vbool119_uses' backwards messages.
  			this.vbool119_uses_B = new Bernoulli[2];
  			this.vBernoulli127 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool119_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli127);
  			}
  			this.vbool119_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli127);
  			// Message to 'vbool119' from Random factor
  			this.vbool119_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli127);
  			// Create array for 'vbool340_uses' backwards messages.
  			this.vbool340_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool340_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool340_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool174_uses' backwards messages.
  			this.vbool174_uses_B = new Bernoulli[2];
  			this.vBernoulli182 = new Bernoulli(0.01);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool174_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli182);
  			}
  			this.vbool174_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli182);
  			// Message to 'vbool174' from Random factor
  			this.vbool174_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli182);
  			// Create array for 'vbool465_uses' backwards messages.
  			this.vbool465_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool465_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool465_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool135_uses' backwards messages.
  			this.vbool135_uses_B = new Bernoulli[3];
  			this.vBernoulli143 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool135_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli143);
  			}
  			this.vbool135_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli143);
  			// Message to 'vbool135' from Random factor
  			this.vbool135_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli143);
  			// Create array for 'vbool348_uses' backwards messages.
  			this.vbool348_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool348_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool348_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool166_uses' backwards messages.
  			this.vbool166_uses_B = new Bernoulli[2];
  			this.vBernoulli174 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool166_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli174);
  			}
  			this.vbool166_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli174);
  			// Message to 'vbool166' from Random factor
  			this.vbool166_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli174);
  			// Create array for 'vbool437_uses' backwards messages.
  			this.vbool437_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool437_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool437_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool127_uses' backwards messages.
  			this.vbool127_uses_B = new Bernoulli[2];
  			this.vBernoulli135 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool127_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli135);
  			}
  			this.vbool127_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli135);
  			// Message to 'vbool127' from Random factor
  			this.vbool127_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli135);
  			// Create array for 'vbool356_uses' backwards messages.
  			this.vbool356_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool356_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool356_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool23_uses' backwards messages.
  			this.vbool23_uses_B = new Bernoulli[2];
  			this.vBernoulli31 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool23_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli31);
  			}
  			this.vbool23_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli31);
  			// Message to 'vbool23' from Random factor
  			this.vbool23_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli31);
  			// Create array for 'vbool364_uses' backwards messages.
  			this.vbool364_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool364_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool364_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool148_uses' backwards messages.
  			this.vbool148_uses_B = new Bernoulli[2];
  			this.vBernoulli156 = new Bernoulli(0.99);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool148_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli156);
  			}
  			this.vbool148_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli156);
  			// Message to 'vbool148' from Random factor
  			this.vbool148_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli156);
  			// Create array for 'vbool429_uses' backwards messages.
  			this.vbool429_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool429_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool429_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool57_uses' backwards messages.
  			this.vbool57_uses_B = new Bernoulli[3];
  			this.vBernoulli65 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool57_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli65);
  			}
  			this.vbool57_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli65);
  			// Message to 'vbool57' from Random factor
  			this.vbool57_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli65);
  			// Create array for 'vbool324_uses' backwards messages.
  			this.vbool324_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool324_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool324_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool31_uses' backwards messages.
  			this.vbool31_uses_B = new Bernoulli[1];
  			this.vBernoulli39 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool31_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli39);
  			}
  			this.vbool31_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli39);
  			// Message to 'vbool31' from Random factor
  			this.vbool31_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli39);
  			// Create array for 'vbool300_uses' backwards messages.
  			this.vbool300_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool300_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool300_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool83_uses' backwards messages.
  			this.vbool83_uses_B = new Bernoulli[2];
  			this.vBernoulli91 = new Bernoulli(0.99);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool83_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli91);
  			}
  			this.vbool83_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli91);
  			// Message to 'vbool83' from Random factor
  			this.vbool83_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli91);
  			// Create array for 'vbool466_uses' backwards messages.
  			this.vbool466_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool466_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool466_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool49_uses' backwards messages.
  			this.vbool49_uses_B = new Bernoulli[2];
  			this.vBernoulli57 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool49_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli57);
  			}
  			this.vbool49_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli57);
  			// Message to 'vbool49' from Random factor
  			this.vbool49_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli57);
  			// Create array for 'vbool308_uses' backwards messages.
  			this.vbool308_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool308_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool308_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool75_uses' backwards messages.
  			this.vbool75_uses_B = new Bernoulli[2];
  			this.vBernoulli83 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool75_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli83);
  			}
  			this.vbool75_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli83);
  			// Message to 'vbool75' from Random factor
  			this.vbool75_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli83);
  			// Create array for 'vbool316_uses' backwards messages.
  			this.vbool316_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool316_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool316_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool332_uses' backwards messages.
  			this.vbool332_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool332_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool332_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool5_uses' backwards messages.
  			this.vbool5_uses_B = new Bernoulli[1];
  			this.vBernoulli13 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool5_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli13);
  			}
  			this.vbool5_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli13);
  			// Message to 'vbool5' from Random factor
  			this.vbool5_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli13);
  			// Create array for 'vbool292_uses' backwards messages.
  			this.vbool292_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool292_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool292_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			this.vbool340_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool119_uses' forwards messages.
  			this.vbool119_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool119_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli127);
  			}
  			this.vbool465_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool174_uses' forwards messages.
  			this.vbool174_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool174_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli182);
  			}
  			// Create array for 'vbool96_uses' forwards messages.
  			this.vbool96_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool96_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli104);
  			}
  			this.vbool348_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool135_uses' forwards messages.
  			this.vbool135_uses_F = new Bernoulli[3];
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool135_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli143);
  			}
  			this.vBernoulli5 = new Bernoulli(0.9);
  			// Message to 'vbool340_uses' from EqualRandom factor
  			this.vbool340_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool348_uses' from EqualRandom factor
  			this.vbool348_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool437_uses' from EqualRandom factor
  			this.vbool437_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool356_uses' from EqualRandom factor
  			this.vbool356_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool364_uses' from EqualRandom factor
  			this.vbool364_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool429_uses' from EqualRandom factor
  			this.vbool429_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool324_uses' from EqualRandom factor
  			this.vbool324_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool300_uses' from EqualRandom factor
  			this.vbool300_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool308_uses' from EqualRandom factor
  			this.vbool308_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool316_uses' from EqualRandom factor
  			this.vbool316_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool332_uses' from EqualRandom factor
  			this.vbool332_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool292_uses' from EqualRandom factor
  			this.vbool292_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool340' from ReplicateWithMarginal factor
  			this.vbool340_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool340_uses_B, this.vbool340_B);
  			// Message to 'vbool348' from ReplicateWithMarginal factor
  			this.vbool348_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool348_uses_B, this.vbool348_B);
  			this.vbool437_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool437' from ReplicateWithMarginal factor
  			this.vbool437_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool437_uses_B, this.vbool437_B);
  			// Create array for 'vbool166_uses' forwards messages.
  			this.vbool166_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool166_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli174);
  			}
  			this.vBernoulli6 = new Bernoulli(0.9);
  			// Message to 'vbool465_uses' from EqualRandom factor
  			this.vbool465_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6);
  			// Message to 'vbool466_uses' from EqualRandom factor
  			this.vbool466_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6);
  			// Message to 'vbool465' from ReplicateWithMarginal factor
  			this.vbool465_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool465_uses_B, this.vbool465_B);
  			this.vbool356_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool356' from ReplicateWithMarginal factor
  			this.vbool356_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool356_uses_B, this.vbool356_B);
  			// Create array for 'vbool127_uses' forwards messages.
  			this.vbool127_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool127_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli135);
  			}
  			this.vbool364_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool364' from ReplicateWithMarginal factor
  			this.vbool364_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool364_uses_B, this.vbool364_B);
  			// Create array for 'vbool23_uses' forwards messages.
  			this.vbool23_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool23_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli31);
  			}
  			this.vbool429_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool429' from ReplicateWithMarginal factor
  			this.vbool429_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool429_uses_B, this.vbool429_B);
  			// Create array for 'vbool148_uses' forwards messages.
  			this.vbool148_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool148_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli156);
  			}
  			this.vbool324_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool324' from ReplicateWithMarginal factor
  			this.vbool324_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool324_uses_B, this.vbool324_B);
  			// Create array for 'vbool57_uses' forwards messages.
  			this.vbool57_uses_F = new Bernoulli[3];
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool57_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli65);
  			}
  			this.vbool300_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool300' from ReplicateWithMarginal factor
  			this.vbool300_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool300_uses_B, this.vbool300_B);
  			// Create array for 'vbool31_uses' forwards messages.
  			this.vbool31_uses_F = new Bernoulli[1];
  
gt: 			for(int _ind0 = 0; _ind0<1; _ind0++)