/// <summary>
        /// The CreateEvaluator.
        /// </summary>
        /// <param name="f">The f<see cref="Formula"/>.</param>
        /// <param name="m">The m<see cref="LeftFormula"/>.</param>
        /// <returns>The <see cref="Evaluator"/>.</returns>
        public Evaluator CreateEvaluator(Formula f, LeftFormula m)
        {
            CombinedMathset mathline = CombineMathset(f, m);
            Evaluator       ev       = new Evaluator(mathline.Compute);

            return(ev);
        }
        /// <summary>
        /// The Compile.
        /// </summary>
        /// <param name="formula">The formula<see cref="Formula"/>.</param>
        /// <returns>The <see cref="CombinedMathset"/>.</returns>
        public static CombinedMathset Compile(Formula formula)
        {
            if (MODULE == null)
            {
                AssemblyName assemblyName = new AssemblyName();
                assemblyName.Name = "EmittedAssembly";

                ASSEMBLY = AssemblyBuilder.DefineDynamicAssembly(assemblyName, CollectMode ? AssemblyBuilderAccess.RunAndCollect : AssemblyBuilderAccess.Run);
                MODULE   = ASSEMBLY.DefineDynamicModule("EmittedModule");
                CLASS_ID = 0;
            }
            CLASS_ID++;

            TypeBuilder MathsetFormula = MODULE.DefineType(TYPE_PREFIX + CLASS_ID, TypeAttributes.Public, typeof(CombinedMathset));

            Type[]             constructorArgs = { };
            ConstructorBuilder constructor     = MathsetFormula.DefineConstructor(
                MethodAttributes.Public, CallingConventions.Standard, null);

            ILGenerator constructorIL = constructor.GetILGenerator();

            constructorIL.Emit(OpCodes.Ldarg_0);
            ConstructorInfo superConstructor = typeof(Object).GetConstructor(new Type[0]);

            constructorIL.Emit(OpCodes.Call, superConstructor);
            constructorIL.Emit(OpCodes.Ret);

            Type[]          args     = { };
            MethodBuilder   fxMethod = MathsetFormula.DefineMethod("Compute", MethodAttributes.Public | MethodAttributes.Virtual, typeof(void), args);
            ILGenerator     methodIL = fxMethod.GetILGenerator();
            CompilerContext context  = new CompilerContext();

            // first pass calculate the parameters
            // initialize and declare the parameters, start with
            // localVectorI = parameters[i];
            // next pass implements the function
            formula.Compile(methodIL, context);
            context.NextPass();
            context.GenerateLocalInit(methodIL);
            formula.Compile(methodIL, context);

            // finally return
            methodIL.Emit(OpCodes.Ret);

            // create the class...
            Type            mxt         = MathsetFormula.CreateTypeInfo();
            CombinedMathset computation = (CombinedMathset)Activator.CreateInstance(mxt, new Object[] { });

            computation.SetParams(context.ParamCards, context.Count);

            return(computation);
        }
        /// <summary>
        /// The CreateEvaluator.
        /// </summary>
        /// <param name="e">The e<see cref="CombinedMathset"/>.</param>
        /// <returns>The <see cref="Evaluator"/>.</returns>
        public Evaluator CreateEvaluator(CombinedMathset e)
        {
            Evaluator ev = new Evaluator(e.Compute);

            return(ev);
        }
        /// <summary>
        /// The Compute.
        /// </summary>
        /// <param name="cm">The cm<see cref="CombinedMathset"/>.</param>
        public void Compute(CombinedMathset cm)
        {
            Evaluator e = new Evaluator(cm.Compute);

            e();
        }
        /// <summary>
        /// The CombineMathset.
        /// </summary>
        /// <param name="f">The f<see cref="Formula"/>.</param>
        /// <param name="m">The m<see cref="LeftFormula"/>.</param>
        /// <returns>The <see cref="CombinedMathset"/>.</returns>
        public CombinedMathset CombineMathset(Formula f, LeftFormula m)
        {
            CombinedMathset mathline = Compiler.Compile(new CombinedFormula(m, f));

            return(mathline);
        }