protected override void InitFunction()
        {
            if (this.SourceType == SourceType.Equation)
            {
                _function = new Parameter2DFunction(_formula, _formulaY);
            }
            else
            {
//				Parametric2DEvalutor evalutor = new Parametric2DEvalutor();
//				evalutor.Text = this.CodeBody;
//				switch(this.CodeLanguage)
//				{
//					case CodeLanguage.CSharp:
//						evalutor.language= CodeLanguage.CSharp;
//						break;
//					case CodeLanguage.VBNET:
//						evalutor.language = CodeLanguage.VBNET;
//						break;
//				}
//				_function = new Parameter2DFunction(new Parameter2DFunctionDelegate(evalutor.Invoke));
                FunctionEvalutor evalutor = new FunctionEvalutor(this.CodeBody, new string[] { "t" }, this.CodeLanguage);
                _function = new Parameter2DFunction((Parameter2DFunctionDelegate)evalutor.CreateDelegate(typeof(Parameter2DFunctionDelegate)));
            }

            if (this.DerivativeMode)
            {
                for (int i = 0; i < this.OrderOfDerivative; i++)
                {
                    _function = _function.Derivative;
                }
            }
        }
        protected override void InitFunction()
        {
            if (this.SourceType == SourceType.Equation)
            {
                _function = new Explicit2DFunction(this.Formula);
            }
            else
            {
//				RealFunctionEvalutor evalutor = new RealFunctionEvalutor();
//				evalutor.Text = this.CodeBody;
//				switch(this.CodeLanguage)
//				{
//					case CodeLanguage.CSharp:
//						evalutor.language= CodeLanguage.CSharp;
//						break;
//					case CodeLanguage.VBNET:
//						evalutor.language = CodeLanguage.VBNET;
//						break;
//				}
//				_function = new Explicit2DFunction(new RealFunction(evalutor.Invoke));
                FunctionEvalutor evalutor = new FunctionEvalutor(this.CodeBody, new string[] { "x" }, this.CodeLanguage);
                _function = new Explicit2DFunction((RealFunction)evalutor.CreateDelegate(typeof(RealFunction)));
            }

            if (_isInvert)
            {
                _function = FunctionFactory.InverseExplicit2DFunction((Explicit2DFunction)_function);
            }

            if (this.DerivativeMode)
            {
                for (int i = 0; i < this.OrderOfDerivative; i++)
                {
                    _function = _function.Derivative;
                    if (_function is Constant)
                    {
                        return;
                    }
                }
            }
        }
        protected override void InitFunction()
        {
            if (this.SourceType == SourceType.Equation)
            {
                _function = new ParametricSurface(_formula, _formulaY, _formulaZ);
            }
            else
            {
//				Parametric3DEvalutor evalutor = new Parametric3DEvalutor();
//				evalutor.Text = this.CodeBody;
//				switch(this.CodeLanguage)
//				{
//					case CodeLanguage.CSharp:
//						evalutor.language= CodeLanguage.CSharp;
//						break;
//					case CodeLanguage.VBNET:
//						evalutor.language = CodeLanguage.VBNET;
//						break;
//				}
//				_function = new Parameter3DFunction(new Parameter3DFunctionDelegate(evalutor.Invoke));
                FunctionEvalutor evalutor = new FunctionEvalutor(this.CodeBody, new string[] { "u", "v" }, this.CodeLanguage);
                _function = new ParametricSurface((ParametricSurfaceDelegate)evalutor.CreateDelegate(typeof(ParametricSurfaceDelegate)));
            }
        }
Beispiel #4
0
        protected override void InitFunction()
        {
            if (this.SourceType == SourceType.Equation)
            {
                _function = new Explicit3DFunction(this.Formula);
            }
            else
            {
//				BivariateFunctionnEvalutor evalutor = new BivariateFunctionnEvalutor();
//				evalutor.Text = this.CodeBody;
//				switch(this.CodeLanguage)
//				{
//					case CodeLanguage.CSharp:
//						evalutor.language= CodeLanguage.CSharp;
//						break;
//					case CodeLanguage.VBNET:
//						evalutor.language = CodeLanguage.VBNET;
//						break;
//				}
//				_function = new Explicit3DFunction(new BivariateRealFunction(evalutor.Invoke));
                FunctionEvalutor evalutor = new FunctionEvalutor(this.CodeBody, new string[] { "x", "y" }, this.CodeLanguage);
                _function = new Explicit3DFunction((BivariateRealFunction)evalutor.CreateDelegate(typeof(BivariateRealFunction)));
            }
        }
		protected override void InitFunction()
		{
			if (this.SourceType == SourceType.Equation)
			{
				_function = new Implicit3DFunction(this.Formula);
			}
			else
			{
//				TrivariateFunctionEvalutor evalutor = new TrivariateFunctionEvalutor();
//				evalutor.Text = this.CodeBody;
//				switch(this.CodeLanguage)
//				{
//					case CodeLanguage.CSharp:
//						evalutor.language= CodeLanguage.CSharp;
//						break;
//					case CodeLanguage.VBNET:
//						evalutor.language = CodeLanguage.VBNET;						
//						break;
//				}
//				_function = new Implicit3DFunction(new TrivariateRealFunction(evalutor.Invoke));
				FunctionEvalutor evalutor = new FunctionEvalutor(this.CodeBody, new string[]{"x", "y", "z"},this.CodeLanguage);
				_function = new Implicit3DFunction((TrivariateRealFunction)evalutor.CreateDelegate(typeof(TrivariateRealFunction)));

			}
		}
		protected override void InitFunction()
		{
			if (this.SourceType == SourceType.Equation)
			{
				_function = new Parameter3DFunction(_formula, _formulaY, _formulaZ);
			}
			else
			{
//				Parametric3DEvalutor evalutor = new Parametric3DEvalutor();
//				evalutor.Text = this.CodeBody;
//				switch(this.CodeLanguage)
//				{
//					case CodeLanguage.CSharp:
//						evalutor.language= CodeLanguage.CSharp;
//						break;
//					case CodeLanguage.VBNET:
//						evalutor.language = CodeLanguage.VBNET;						
//						break;
//				}
//				_function = new Parameter3DFunction(new Parameter3DFunctionDelegate(evalutor.Invoke));			
				FunctionEvalutor evalutor = new FunctionEvalutor(this.CodeBody, new string[]{"t"},this.CodeLanguage);
				_function = new Parameter3DFunction((Parameter3DFunctionDelegate)evalutor.CreateDelegate(typeof(Parameter3DFunctionDelegate)));

			}

		}
		protected override void InitFunction()
		{
			if (this.SourceType == SourceType.Equation)
			{
				_function = new Implicit2DFunction(this.Formula);
			}
			else
			{
//				BivariateFunctionnEvalutor evalutor = new BivariateFunctionnEvalutor();
//				evalutor.Text = this.CodeBody;
//				switch(this.CodeLanguage)
//				{
//					case CodeLanguage.CSharp:
//						evalutor.language= CodeLanguage.CSharp;
//						break;
//					case CodeLanguage.VBNET:
//						evalutor.language = CodeLanguage.VBNET;						
//						break;
//				}
//				_function = new Implicit2DFunction(new BivariateRealFunction(evalutor.Invoke));
				FunctionEvalutor evalutor = new FunctionEvalutor(this.CodeBody, new string[]{"x", "y"},this.CodeLanguage);
				_function = new Implicit2DFunction((BivariateRealFunction)evalutor.CreateDelegate(typeof(BivariateRealFunction)));

			}

			if (this.DerivativeMode)
			{
				for (int i = 0; i < this.OrderOfDerivative; i++)
				{
					_function = _function.Derivative;
					if (_function is Constant)
						return;
				}
			}
		}