/// <summary>Initializes a function that defined by expression.</summary> /// <exception cref="System.ArgumentException" caption=""></exception> /// <exception cref="System.ArgumentNullException" caption=""></exception> /// <exception cref="ExpressionSyntaxException" caption="ExpressionSyntaxException"></exception> public Implicit2DFunction(string expression) { if (expression == null) { throw new ArgumentNullException("expression"); } _expressionTree = new ExpressionTree(expression); if (_expressionTree.Variables.Length != 2) { throw new ArgumentException("Implicit 2D function must have two variables in expression", "expression"); } _expression = expression; ExpressionCompiler compiler = new ExpressionCompiler(_expressionTree); _function = (BivariateRealFunction)compiler.CreateDelegate(typeof(BivariateRealFunction)); base._delegate = _function; base._definitionType = DefinitionType.Analytic; }
/// <summary><para>Initializes a function that defined by delegate.</para></summary> public Explicit3DFunction(BivariateRealFunction function) { if (function == null) throw new ArgumentNullException("function"); _function = function; base._delegate = _function; base._definitionType = DefinitionType.Numerical; }
/// <summary><para>Initializes a function that defined by delegate.</para></summary> public Explicit3DFunction(BivariateRealFunction function) { if (function == null) { throw new ArgumentNullException("function"); } _function = function; base._delegate = _function; base._definitionType = DefinitionType.Numerical; }
private Explicit3DFunction(ExpressionTree tree) { _expressionTree = tree; _expression = _expressionTree.ToString(); ExpressionCompiler compiler = new ExpressionCompiler(_expressionTree); _function = (BivariateRealFunction)compiler.CreateDelegate(typeof(BivariateRealFunction)); base._delegate = _function; base._definitionType = DefinitionType.Analytic; }
/// <summary>Initializes a function that defined by expression.</summary> /// <exception cref="System.ArgumentException" caption=""></exception> /// <exception cref="System.ArgumentNullException" caption=""></exception> /// <exception cref="ExpressionSyntaxException" caption="ExpressionSyntaxException"></exception> public Implicit2DFunction(string expression) { if (expression == null) throw new ArgumentNullException("expression"); _expressionTree = new ExpressionTree(expression); if (_expressionTree.Variables.Length != 2) throw new ArgumentException("Implicit 2D function must have two variables in expression","expression"); _expression = expression; ExpressionCompiler compiler = new ExpressionCompiler(_expressionTree); _function = (BivariateRealFunction) compiler.CreateDelegate(typeof(BivariateRealFunction)); base._delegate = _function; base._definitionType = DefinitionType.Analytic; }
public Explicit3DFunctionPlotter(Explicit3DFunction function) { _function = function.ValueAt; }
private Explicit3DFunction (ExpressionTree tree) { _expressionTree = tree; _expression = _expressionTree.ToString(); ExpressionCompiler compiler = new ExpressionCompiler(_expressionTree); _function = (BivariateRealFunction) compiler.CreateDelegate(typeof(BivariateRealFunction)); base._delegate = _function; base._definitionType = DefinitionType.Analytic; }
public Implicit2DFunctionPlotter(Implicit2DFunction function) { _function = function.ValueAt; }