コード例 #1
0
    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);
      }
    }
コード例 #2
0
 public PlottingRangeController(PositiveIntegerRange doc)
 {
   _doc = doc;
   _tempDoc = (PositiveIntegerRange)doc.Clone();
 }
コード例 #3
0
ファイル: FitElement.cs プロジェクト: xuchuansheng/GenXSource
 public void SetRowRange(PositiveIntegerRange range)
 {
   this._rangeOfRows.CopyFrom(range);
   OnChanged();
 }
コード例 #4
0
ファイル: FitElement.cs プロジェクト: xuchuansheng/GenXSource
 /// <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();
 }
コード例 #5
0
ファイル: FitElement.cs プロジェクト: xuchuansheng/GenXSource
    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);

    }
コード例 #6
0
ファイル: FitElement.cs プロジェクト: xuchuansheng/GenXSource
    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;

    }
コード例 #7
0
ファイル: FitElement.cs プロジェクト: xuchuansheng/GenXSource
    public FitElement()
    {
      _independentVariables = new NumericColumnProxy[0];
    
      _dependentVariables = new NumericColumnProxy[0];
     
      _errorEvaluation = new IVarianceScaling[0];
 
      _rangeOfRows = PositiveIntegerRange.NewFromFirstAndCount(0,int.MaxValue);
    }