public EquationFunctionValue(string prototype, string definition, double[] defaults) { Match m = prototypeRegex.Match(prototype); m_paramOrders = new string[m.Groups["VarName"].Captures.Count]; for (int i = 0; i < m.Groups["VarName"].Captures.Count; i++) { m_paramOrders[i] = m.Groups["VarName"].Captures[i].Value; } m_Frag = EquationFragment.Parse(definition, null); m_defaults = defaults; m_sName = m.Groups["Name"].Value; }
public EquationGraphSeries(EquationFragment frag, string VariableName) { m_Frag = frag; m_GraphVariable = VariableName; }
public EquationGraphSeries(EquationFragment frag, string VariableName, double _MinX, double _MaxX) { m_Frag = frag; MinX = _MinX; MaxX = _MaxX; m_GraphVariable = VariableName; }
public ValueFragment(string val, EquationFragment parent) : base(parent) { m_sValueName = val; m_bIsConst = double.TryParse(val, out m_dConstValue); }
public UnaryOperand(string op, EquationFragment frag1, EquationFragment parent) : base(parent) { m_sOp = op; if (m_Frag1 is EmptyEquationFragment) throw new EmptyEquationFragmentException(); m_Frag1 = frag1; }
public Function(string name, EquationFragment parameters, EquationFragment parent) : base(parent) { m_sFunctionName = name; m_Parameters = parameters; if (FunctionValues != null) { if (FunctionValues.ContainsKey(m_sFunctionName)) m_FunctionValue = FunctionValues[m_sFunctionName]; else if (EquationFragment.GlobalFunctions.ContainsKey(m_sFunctionName)) m_FunctionValue = EquationFragment.GlobalFunctions[m_sFunctionName]; else throw new FunctionNotFoundException("Function '" + name + "' was not found", name); } else if (EquationFragment.GlobalFunctions.ContainsKey(m_sFunctionName)) m_FunctionValue = EquationFragment.GlobalFunctions[m_sFunctionName]; if (m_FunctionValue != null && m_FunctionValue.ParamCount != 0 && parameters is EmptyEquationFragment) throw new ParameterMismatchException("Function '" + name + "' does not take zero parameters"); }
protected EquationFragment(string s, EquationFragment parent) : this(parent) { InternalParse(s); }
protected EquationFragment(EquationFragment parent) { this.m_Parent = parent; }