public void EhView_Changed(string fromValue, string toValue) { int from; int to = int.MaxValue; if (!int.TryParse(fromValue, out from)) Current.Gui.ErrorMessageBox("PositiveIntegerRange 'From' is not a integer number"); if (toValue != null && toValue.Trim().Length > 0) { if (!int.TryParse(toValue, out to)) Current.Gui.ErrorMessageBox("PositiveIntegerRange 'To' is not a integer number"); } try { if (to != int.MaxValue) _tempDoc = PositiveIntegerRange.NewFromFirstAndLast(from, to); else _tempDoc = PositiveIntegerRange.NewFromFirstToInfinity(from); } catch (Exception ex) { Current.Gui.ErrorMessageBox(ex.Message); } }
public PlottingRangeController(PositiveIntegerRange doc) { _doc = doc; _tempDoc = (PositiveIntegerRange)doc.Clone(); }
public void SetRowRange(PositiveIntegerRange range) { this._rangeOfRows.CopyFrom(range); OnChanged(); }
/// <summary> /// Sets the range of rows that are used for the regression. /// </summary> /// <param name="firstIndex">First row to be used.</param> /// <param name="count">Number of rows to be used [from firstIndex to (firstIndex+count-1)].</param> public void SetRowRange(int firstIndex, int count) { this._rangeOfRows = PositiveIntegerRange.NewFromFirstAndCount(firstIndex,count); OnChanged(); }
public FitElement(INumericColumn xColumn, INumericColumn yColumn, int start, int count) { _independentVariables = new NumericColumnProxy[1]; _independentVariables[0] = new NumericColumnProxy(xColumn); _dependentVariables = new NumericColumnProxy[1]; _dependentVariables[0] = new NumericColumnProxy(yColumn); _errorEvaluation = new IVarianceScaling[1]; _errorEvaluation[0] = new ConstantVarianceScaling(); _rangeOfRows = PositiveIntegerRange.NewFromFirstAndCount(start,count); }
public FitElement(FitElement from) { this._fitFunction = from._fitFunction; if (_fitFunction is ICloneable) this._fitFunction = (IFitFunction)((ICloneable)from.FitFunction).Clone(); _rangeOfRows = PositiveIntegerRange.NewFromFirstAndCount(from._rangeOfRows.First, from._rangeOfRows.Count); _independentVariables = new NumericColumnProxy[from._independentVariables.Length]; for (int i = 0; i < _independentVariables.Length; ++i) { if(from._independentVariables[i]!=null) _independentVariables[i] = (NumericColumnProxy)from._independentVariables[i].Clone(); } _dependentVariables = new NumericColumnProxy[from._dependentVariables.Length]; for (int i = 0; i < _dependentVariables.Length; ++i) { if (from._dependentVariables[i] != null) _dependentVariables[i] = (NumericColumnProxy)from._dependentVariables[i].Clone(); } _errorEvaluation = new IVarianceScaling[from._errorEvaluation.Length]; for (int i = 0; i < _errorEvaluation.Length; ++i) { if (from._errorEvaluation[i] != null) _errorEvaluation[i] = (IVarianceScaling)from._errorEvaluation[i].Clone(); } _parameterNames = (string[])from._parameterNames.Clone(); _parameterNameStart = from._parameterNameStart; }
public FitElement() { _independentVariables = new NumericColumnProxy[0]; _dependentVariables = new NumericColumnProxy[0]; _errorEvaluation = new IVarianceScaling[0]; _rangeOfRows = PositiveIntegerRange.NewFromFirstAndCount(0,int.MaxValue); }