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 Model13_EP : IIterativeProcess
  	{
  		#region Fields
  		// Messages from uses of 'vbool29'
  		public Bernoulli[] vbool29_uses_B;
  		// The constant 'vBernoulli37'
  		public Bernoulli vBernoulli37;
  		// Message from definition of 'vbool29'
  		public Bernoulli vbool29_F;
  		// Messages from uses of 'vbool21'
  		public Bernoulli[] vbool21_uses_B;
  		// The constant 'vBernoulli29'
  		public Bernoulli vBernoulli29;
  		// Message from definition of 'vbool21'
  		public Bernoulli vbool21_F;
  		// Messages from uses of 'vbool296'
  		public Bernoulli[] vbool296_uses_B;
  		// Message from definition of 'vbool296'
  		public Bernoulli vbool296_F;
  		// Messages from uses of 'vbool133'
  		public Bernoulli[] vbool133_uses_B;
  		// The constant 'vBernoulli141'
  		public Bernoulli vBernoulli141;
  		// Message from definition of 'vbool133'
  		public Bernoulli vbool133_F;
  		// Messages from uses of 'vbool360'
  		public Bernoulli[] vbool360_uses_B;
  		// Message from definition of 'vbool360'
  		public Bernoulli vbool360_F;
  		// Messages from uses of 'vbool117'
  		public Bernoulli[] vbool117_uses_B;
  		// The constant 'vBernoulli125'
  		public Bernoulli vBernoulli125;
  		// Message from definition of 'vbool117'
  		public Bernoulli vbool117_F;
  		// Messages from uses of 'vbool344'
  		public Bernoulli[] vbool344_uses_B;
  		// Message from definition of 'vbool344'
  		public Bernoulli vbool344_F;
  		// Messages from uses of 'vbool125'
  		public Bernoulli[] vbool125_uses_B;
  		// The constant 'vBernoulli133'
  		public Bernoulli vBernoulli133;
  		// Message from definition of 'vbool125'
  		public Bernoulli vbool125_F;
  		// Messages from uses of 'vbool352'
  		public Bernoulli[] vbool352_uses_B;
  		// Message from definition of 'vbool352'
  		public Bernoulli vbool352_F;
  		// Messages from uses of 'vbool94'
  		public Bernoulli[] vbool94_uses_B;
  		// The constant 'vBernoulli102'
  		public Bernoulli vBernoulli102;
  		// Message from definition of 'vbool94'
  		public Bernoulli vbool94_F;
  		// Messages from uses of 'vbool336'
  		public Bernoulli[] vbool336_uses_B;
  		// Message from definition of 'vbool336'
  		public Bernoulli vbool336_F;
  		// Messages from uses of 'vbool55'
  		public Bernoulli[] vbool55_uses_B;
  		// The constant 'vBernoulli63'
  		public Bernoulli vBernoulli63;
  		// Message from definition of 'vbool55'
  		public Bernoulli vbool55_F;
  		// Messages from uses of 'vbool320'
  		public Bernoulli[] vbool320_uses_B;
  		// Message from definition of 'vbool320'
  		public Bernoulli vbool320_F;
  		// Messages from uses of 'vbool172'
  		public Bernoulli[] vbool172_uses_B;
  		// The constant 'vBernoulli180'
  		public Bernoulli vBernoulli180;
  		// Message from definition of 'vbool172'
  		public Bernoulli vbool172_F;
  		// Messages from uses of 'vbool457'
  		public Bernoulli[] vbool457_uses_B;
  		// Message from definition of 'vbool457'
  		public Bernoulli vbool457_F;
  		// Messages from uses of 'vbool47'
  		public Bernoulli[] vbool47_uses_B;
  		// The constant 'vBernoulli55'
  		public Bernoulli vBernoulli55;
  		// Message from definition of 'vbool47'
  		public Bernoulli vbool47_F;
  		// Messages from uses of 'vbool304'
  		public Bernoulli[] vbool304_uses_B;
  		// Message from definition of 'vbool304'
  		public Bernoulli vbool304_F;
  		// Messages from uses of 'vbool73'
  		public Bernoulli[] vbool73_uses_B;
  		// The constant 'vBernoulli81'
  		public Bernoulli vBernoulli81;
  		// Message from definition of 'vbool73'
  		public Bernoulli vbool73_F;
  		// Messages from uses of 'vbool312'
  		public Bernoulli[] vbool312_uses_B;
  		// Message from definition of 'vbool312'
  		public Bernoulli vbool312_F;
  		// Messages from uses of 'vbool164'
  		public Bernoulli[] vbool164_uses_B;
  		// The constant 'vBernoulli172'
  		public Bernoulli vBernoulli172;
  		// Message from definition of 'vbool164'
  		public Bernoulli vbool164_F;
  		// Messages from uses of 'vbool433'
  		public Bernoulli[] vbool433_uses_B;
  		// Message from definition of 'vbool433'
  		public Bernoulli vbool433_F;
  		// Messages from uses of 'vbool3'
  		public Bernoulli[] vbool3_uses_B;
  		// The constant 'vBernoulli11'
  		public Bernoulli vBernoulli11;
  		// Message from definition of 'vbool3'
  		public Bernoulli vbool3_F;
  		// Messages from uses of 'vbool288'
  		public Bernoulli[] vbool288_uses_B;
  		// Message from definition of 'vbool288'
  		public Bernoulli vbool288_F;
  		// Messages from uses of 'vbool81'
  		public Bernoulli[] vbool81_uses_B;
  		// The constant 'vBernoulli89'
  		public Bernoulli vBernoulli89;
  		// Message from definition of 'vbool81'
  		public Bernoulli vbool81_F;
  		// Messages from uses of 'vbool328'
  		public Bernoulli[] vbool328_uses_B;
  		// Message from definition of 'vbool328'
  		public Bernoulli vbool328_F;
  		// Messages from uses of 'vbool146'
  		public Bernoulli[] vbool146_uses_B;
  		// The constant 'vBernoulli154'
  		public Bernoulli vBernoulli154;
  		// Message from definition of 'vbool146'
  		public Bernoulli vbool146_F;
  		// Messages from uses of 'vbool425'
  		public Bernoulli[] vbool425_uses_B;
  		// Message from definition of 'vbool425'
  		public Bernoulli vbool425_F;
  		// Messages from uses of 'vbool458'
  		public Bernoulli[] vbool458_uses_B;
  		// Message from definition of 'vbool458'
  		public Bernoulli vbool458_F;
  		// Message to definition of 'vbool296'
  		public Bernoulli vbool296_B;
  		// Messages to uses of 'vbool21'
  		public Bernoulli[] vbool21_uses_F;
  		// Messages to uses of 'vbool29'
  		public Bernoulli[] vbool29_uses_F;
  		// Message to definition of 'vbool360'
  		public Bernoulli vbool360_B;
  		// Messages to uses of 'vbool133'
  		public Bernoulli[] vbool133_uses_F;
  		// The constant 'vBernoulli5'
  		public Bernoulli vBernoulli5;
  		// Message to definition of 'vbool344'
  		public Bernoulli vbool344_B;
  		// Messages to uses of 'vbool117'
  		public Bernoulli[] vbool117_uses_F;
  		// Message to definition of 'vbool352'
  		public Bernoulli vbool352_B;
  		// Messages to uses of 'vbool125'
  		public Bernoulli[] vbool125_uses_F;
  		// Message to definition of 'vbool336'
  		public Bernoulli vbool336_B;
  		// Messages to uses of 'vbool94'
  		public Bernoulli[] vbool94_uses_F;
  		// Message to definition of 'vbool320'
  		public Bernoulli vbool320_B;
  		// Messages to uses of 'vbool55'
  		public Bernoulli[] vbool55_uses_F;
  		// Message to definition of 'vbool457'
  		public Bernoulli vbool457_B;
  		// Messages to uses of 'vbool172'
  		public Bernoulli[] vbool172_uses_F;
  		// Message to definition of 'vbool304'
  		public Bernoulli vbool304_B;
  		// Messages to uses of 'vbool47'
  		public Bernoulli[] vbool47_uses_F;
  		// Message to definition of 'vbool312'
  		public Bernoulli vbool312_B;
  		// Messages to uses of 'vbool73'
  		public Bernoulli[] vbool73_uses_F;
  		// Message to definition of 'vbool433'
  		public Bernoulli vbool433_B;
  		// Messages to uses of 'vbool164'
  		public Bernoulli[] vbool164_uses_F;
  		// The constant 'vBernoulli6'
  		public Bernoulli vBernoulli6;
  		// Message to definition of 'vbool288'
  		public Bernoulli vbool288_B;
  		// Messages to uses of 'vbool3'
  		public Bernoulli[] vbool3_uses_F;
  		// Message to definition of 'vbool328'
  		public Bernoulli vbool328_B;
  		// Messages to uses of 'vbool81'
  		public Bernoulli[] vbool81_uses_F;
  		// Message to definition of 'vbool425'
  		public Bernoulli vbool425_B;
  		// Messages to uses of 'vbool146'
  		public Bernoulli[] vbool146_uses_F;
  		// Message to definition of 'vbool458'
  		public Bernoulli vbool458_B;
  		// Message to marginal of 'vbool296'
  		public Bernoulli vbool296_marginal_B;
  		// Message to marginal of 'vbool360'
  		public Bernoulli vbool360_marginal_B;
  		// Message to marginal of 'vbool344'
  		public Bernoulli vbool344_marginal_B;
  		// Message to marginal of 'vbool352'
  		public Bernoulli vbool352_marginal_B;
  		// Message to marginal of 'vbool336'
  		public Bernoulli vbool336_marginal_B;
  		// Message to marginal of 'vbool320'
  		public Bernoulli vbool320_marginal_B;
  		// Message to marginal of 'vbool457'
  		public Bernoulli vbool457_marginal_B;
  		// Message to marginal of 'vbool304'
  		public Bernoulli vbool304_marginal_B;
  		// Message to marginal of 'vbool312'
  		public Bernoulli vbool312_marginal_B;
  		// Message to marginal of 'vbool433'
  		public Bernoulli vbool433_marginal_B;
  		// Message to marginal of 'vbool288'
  		public Bernoulli vbool288_marginal_B;
  		// Message to marginal of 'vbool328'
  		public Bernoulli vbool328_marginal_B;
  		// Message to marginal of 'vbool425'
  		public Bernoulli vbool425_marginal_B;
  		// Message to marginal of 'vbool458'
  		public Bernoulli vbool458_marginal_B;
  		// Message to marginal of 'vbool29'
  		public Bernoulli vbool29_marginal_B;
  		// Message to marginal of 'vbool21'
  		public Bernoulli vbool21_marginal_B;
  		// Message to marginal of 'vbool133'
  		public Bernoulli vbool133_marginal_B;
  		// Message to marginal of 'vbool117'
  		public Bernoulli vbool117_marginal_B;
  		// Message to marginal of 'vbool125'
  		public Bernoulli vbool125_marginal_B;
  		// Message to marginal of 'vbool94'
  		public Bernoulli vbool94_marginal_B;
  		// Message to marginal of 'vbool55'
  		public Bernoulli vbool55_marginal_B;
  		// Message to marginal of 'vbool172'
  		public Bernoulli vbool172_marginal_B;
  		// Message to marginal of 'vbool47'
  		public Bernoulli vbool47_marginal_B;
  		// Message to marginal of 'vbool73'
  		public Bernoulli vbool73_marginal_B;
  		// Message to marginal of 'vbool164'
  		public Bernoulli vbool164_marginal_B;
  		// Message to marginal of 'vbool3'
  		public Bernoulli vbool3_marginal_B;
  		// Message to marginal of 'vbool81'
  		public Bernoulli vbool81_marginal_B;
  		// Message to marginal of 'vbool146'
  		public Bernoulli vbool146_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 'vbool29_uses' backwards messages.
  			this.vbool29_uses_B = new Bernoulli[1];
  			this.vBernoulli37 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool29_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli37);
  			}
  			this.vbool29_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli37);
  			// Message to 'vbool29' from Random factor
  			this.vbool29_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli37);
  			// Create array for 'vbool21_uses' backwards messages.
  			this.vbool21_uses_B = new Bernoulli[2];
  			this.vBernoulli29 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool21_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli29);
  			}
  			this.vbool21_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli29);
  			// Message to 'vbool21' from Random factor
  			this.vbool21_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli29);
  			// Create array for 'vbool296_uses' backwards messages.
  			this.vbool296_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool296_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool296_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool133_uses' backwards messages.
  			this.vbool133_uses_B = new Bernoulli[3];
  			this.vBernoulli141 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool133_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli141);
  			}
  			this.vbool133_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli141);
  			// Message to 'vbool133' from Random factor
  			this.vbool133_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli141);
  			// Create array for 'vbool360_uses' backwards messages.
  			this.vbool360_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool360_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool360_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool117_uses' backwards messages.
  			this.vbool117_uses_B = new Bernoulli[2];
  			this.vBernoulli125 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool117_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli125);
  			}
  			this.vbool117_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli125);
  			// Message to 'vbool117' from Random factor
  			this.vbool117_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli125);
  			// Create array for 'vbool344_uses' backwards messages.
  			this.vbool344_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool344_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool344_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool125_uses' backwards messages.
  			this.vbool125_uses_B = new Bernoulli[2];
  			this.vBernoulli133 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool125_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli133);
  			}
  			this.vbool125_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli133);
  			// Message to 'vbool125' from Random factor
  			this.vbool125_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli133);
  			// Create array for 'vbool352_uses' backwards messages.
  			this.vbool352_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool352_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool352_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool94_uses' backwards messages.
  			this.vbool94_uses_B = new Bernoulli[2];
  			this.vBernoulli102 = new Bernoulli(0.01);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool94_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli102);
  			}
  			this.vbool94_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli102);
  			// Message to 'vbool94' from Random factor
  			this.vbool94_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli102);
  			// Create array for 'vbool336_uses' backwards messages.
  			this.vbool336_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool336_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool336_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool55_uses' backwards messages.
  			this.vbool55_uses_B = new Bernoulli[3];
  			this.vBernoulli63 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool55_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli63);
  			}
  			this.vbool55_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli63);
  			// Message to 'vbool55' from Random factor
  			this.vbool55_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli63);
  			// Create array for 'vbool320_uses' backwards messages.
  			this.vbool320_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool320_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool320_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool172_uses' backwards messages.
  			this.vbool172_uses_B = new Bernoulli[2];
  			this.vBernoulli180 = new Bernoulli(0.01);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool172_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli180);
  			}
  			this.vbool172_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli180);
  			// Message to 'vbool172' from Random factor
  			this.vbool172_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli180);
  			// Create array for 'vbool457_uses' backwards messages.
  			this.vbool457_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool457_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool457_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool47_uses' backwards messages.
  			this.vbool47_uses_B = new Bernoulli[2];
  			this.vBernoulli55 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool47_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli55);
  			}
  			this.vbool47_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli55);
  			// Message to 'vbool47' from Random factor
  			this.vbool47_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli55);
  			// Create array for 'vbool304_uses' backwards messages.
  			this.vbool304_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool304_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool304_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool73_uses' backwards messages.
  			this.vbool73_uses_B = new Bernoulli[2];
  			this.vBernoulli81 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool73_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli81);
  			}
  			this.vbool73_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli81);
  			// Message to 'vbool73' from Random factor
  			this.vbool73_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli81);
  			// Create array for 'vbool312_uses' backwards messages.
  			this.vbool312_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool312_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool312_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool164_uses' backwards messages.
  			this.vbool164_uses_B = new Bernoulli[2];
  			this.vBernoulli172 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool164_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli172);
  			}
  			this.vbool164_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli172);
  			// Message to 'vbool164' from Random factor
  			this.vbool164_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli172);
  			// Create array for 'vbool433_uses' backwards messages.
  			this.vbool433_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool433_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool433_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool3_uses' backwards messages.
  			this.vbool3_uses_B = new Bernoulli[1];
  			this.vBernoulli11 = new Bernoulli(0.5);
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool3_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli11);
  			}
  			this.vbool3_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli11);
  			// Message to 'vbool3' from Random factor
  			this.vbool3_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli11);
  			// Create array for 'vbool288_uses' backwards messages.
  			this.vbool288_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool288_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool288_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool81_uses' backwards messages.
  			this.vbool81_uses_B = new Bernoulli[2];
  			this.vBernoulli89 = new Bernoulli(0.01);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool81_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli89);
  			}
  			this.vbool81_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli89);
  			// Message to 'vbool81' from Random factor
  			this.vbool81_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli89);
  			// Create array for 'vbool328_uses' backwards messages.
  			this.vbool328_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool328_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool328_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool146_uses' backwards messages.
  			this.vbool146_uses_B = new Bernoulli[2];
  			this.vBernoulli154 = new Bernoulli(0.01);
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool146_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli154);
  			}
  			this.vbool146_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli154);
  			// Message to 'vbool146' from Random factor
  			this.vbool146_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli154);
  			// Create array for 'vbool425_uses' backwards messages.
  			this.vbool425_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool425_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool425_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool458_uses' backwards messages.
  			this.vbool458_uses_B = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool458_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			}
  			this.vbool458_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			this.vbool296_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool21_uses' forwards messages.
  			this.vbool21_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool21_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli29);
  			}
  			// Create array for 'vbool29_uses' forwards messages.
  			this.vbool29_uses_F = new Bernoulli[1];
  			for(int _ind0 = 0; _ind0<1; _ind0++)
  			{
  				this.vbool29_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli37);
  			}
  			// Message to 'vbool29_uses' from UsesEqualDef factor
  			this.vbool29_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool29_uses_B, this.vbool29_F, 0, this.vbool29_uses_F[0]);
  			this.vbool360_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool133_uses' forwards messages.
  			this.vbool133_uses_F = new Bernoulli[3];
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool133_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli141);
  			}
  			this.vBernoulli5 = new Bernoulli(0.9);
  			// Message to 'vbool296_uses' from EqualRandom factor
  			this.vbool296_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool360_uses' from EqualRandom factor
  			this.vbool360_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool344_uses' from EqualRandom factor
  			this.vbool344_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool352_uses' from EqualRandom factor
  			this.vbool352_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool336_uses' from EqualRandom factor
  			this.vbool336_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool320_uses' from EqualRandom factor
  			this.vbool320_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool304_uses' from EqualRandom factor
  			this.vbool304_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool312_uses' from EqualRandom factor
  			this.vbool312_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool433_uses' from EqualRandom factor
  			this.vbool433_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool288_uses' from EqualRandom factor
  			this.vbool288_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool328_uses' from EqualRandom factor
  			this.vbool328_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool425_uses' from EqualRandom factor
  			this.vbool425_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5);
  			// Message to 'vbool296' from ReplicateWithMarginal factor
  			this.vbool296_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool296_uses_B, this.vbool296_B);
  			// Message to 'vbool21_uses' from AreEqual factor
  			this.vbool21_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool296_B, this.vbool29_uses_F[0]);
  			// Message to 'vbool360' from ReplicateWithMarginal factor
  			this.vbool360_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool360_uses_B, this.vbool360_B);
  			// Message to 'vbool21_uses' from UsesEqualDef factor
  			this.vbool21_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool21_uses_B, this.vbool21_F, 1, this.vbool21_uses_F[1]);
  			// Message to 'vbool133_uses' from AreEqual factor
  			this.vbool133_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool360_B, this.vbool21_uses_F[1]);
  			this.vbool344_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool344' from ReplicateWithMarginal factor
  			this.vbool344_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool344_uses_B, this.vbool344_B);
  			// Create array for 'vbool117_uses' forwards messages.
  			this.vbool117_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool117_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli125);
  			}
  			this.vbool352_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool352' from ReplicateWithMarginal factor
  			this.vbool352_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool352_uses_B, this.vbool352_B);
  			// Create array for 'vbool125_uses' forwards messages.
  			this.vbool125_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool125_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli133);
  			}
  			this.vbool336_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool336' from ReplicateWithMarginal factor
  			this.vbool336_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool336_uses_B, this.vbool336_B);
  			// Create array for 'vbool94_uses' forwards messages.
  			this.vbool94_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool94_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli102);
  			}
  			this.vbool320_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool320' from ReplicateWithMarginal factor
  			this.vbool320_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool320_uses_B, this.vbool320_B);
  			// Create array for 'vbool55_uses' forwards messages.
  			this.vbool55_uses_F = new Bernoulli[3];
  			for(int _ind0 = 0; _ind0<3; _ind0++)
  			{
  				this.vbool55_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli63);
  			}
  			this.vbool457_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Create array for 'vbool172_uses' forwards messages.
  			this.vbool172_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool172_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli180);
  			}
  			this.vbool304_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool304' from ReplicateWithMarginal factor
  			this.vbool304_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool304_uses_B, this.vbool304_B);
  			// Create array for 'vbool47_uses' forwards messages.
  			this.vbool47_uses_F = new Bernoulli[2];
  			for(int _ind0 = 0; _ind0<2; _ind0++)
  			{
  				this.vbool47_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli55);
  			}
  			this.vbool312_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli());
  			// Message to 'vbool312' from ReplicateWithMarginal factor
  			this.vbool312_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool312_uses_B, this.vbool312_B);
  			// Create array for 'vbool73_uses' forwards messages.
  
gt: 			this.vbool73_uses_F = new Bernoulli[2];