Beispiel #1
0
 public NonlinearFitDocument(NonlinearFitDocument from)
 {
     _fitEnsemble          = null == from._fitEnsemble ? null : (FitEnsemble)from._fitEnsemble.Clone();
     _fitEnsemble.Changed += new EventHandler(EhFitEnsemble_Changed);
     _currentParameters    = null == from._currentParameters ? null : (ParameterSet)from._currentParameters.Clone();
     // Note that the fit context is not cloned here.
 }
 public NonlinearFitDocument(NonlinearFitDocument from)
 {
   _fitEnsemble = null == from._fitEnsemble ? null : (FitEnsemble)from._fitEnsemble.Clone();
   _fitEnsemble.Changed += new EventHandler(EhFitEnsemble_Changed);
   _currentParameters = null == from._currentParameters ? null : (ParameterSet)from._currentParameters.Clone();
   // Note that the fit context is not cloned here.
 }
Beispiel #3
0
 public NonlinearFitDocument()
 {
     _fitEnsemble = new FitEnsemble()
     {
         ParentObject = this
     };
     _currentParameters = new ParameterSet();
 }
Beispiel #4
0
		public NonlinearFitDocument(NonlinearFitDocument from)
		{
			_fitEnsemble = null == from._fitEnsemble ? null : (FitEnsemble)from._fitEnsemble.Clone();
			_fitEnsemble.ParentObject = this;

			_currentParameters = null == from._currentParameters ? null : (ParameterSet)from._currentParameters.Clone();
			// Note that the fit context is not cloned here.
		}
Beispiel #5
0
        public NonlinearFitDocument(NonlinearFitDocument from)
        {
            _fitEnsemble = null == from._fitEnsemble ? null : (FitEnsemble)from._fitEnsemble.Clone();
            _fitEnsemble.ParentObject = this;

            _currentParameters = null == from._currentParameters ? null : (ParameterSet)from._currentParameters.Clone();
            // Note that the fit context is not cloned here.
        }
Beispiel #6
0
            public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
            {
                FitEnsemble s = (FitEnsemble)obj;

                info.CreateArray("FitElements", s.Count);
                for (int i = 0; i < s.Count; ++i)
                {
                    info.AddValue("e", s[i]);
                }
                info.CommitArray();
            }
Beispiel #7
0
        public object Clone()
        {
            FitEnsemble result = new FitEnsemble();

            foreach (FitElement ele in this)
            {
                result.Add((FitElement)ele.Clone());
            }

            return(result);
        }
Beispiel #8
0
        public FitEnsemble(FitEnsemble from)
        {
            foreach (var ele in from)
            {
                var toadd = (FitElement)ele.Clone();
                toadd.ParentObject = this;
                _fitElements.Add(toadd);
            }

            CollectParameterNames();
        }
Beispiel #9
0
            public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                FitEnsemble s = o != null ? (FitEnsemble)o : new FitEnsemble();

                int arraycount = info.OpenArray();

                for (int i = 0; i < arraycount; ++i)
                {
                    s.Add((FitElement)info.GetValue(s));
                }
                info.CloseArray(arraycount);

                s.CollectParameterNames();

                return(s);
            }
Beispiel #10
0
 public NonlinearFitDocument()
 {
     _fitEnsemble          = new FitEnsemble();
     _currentParameters    = new ParameterSet();
     _fitEnsemble.Changed += new EventHandler(EhFitEnsemble_Changed);
 }
Beispiel #11
0
		/// <summary>
		/// Constructor of the adapter.
		/// </summary>
		/// <param name="ensemble">The fit ensemble, i.e. the functions and data you intend to fit.</param>
		/// <param name="paraSet">The set of initial parameter. Must contain a initial estimation of the parameters. Contains also information which
		/// parameters can vary and which are fixed during the fitting procedure.</param>
		public LevMarAdapter(FitEnsemble ensemble, ParameterSet paraSet)
		{
			_fitEnsemble = ensemble;

			CalculateCachedData(paraSet);
		}
 public NonlinearFitDocument()
 {
   _fitEnsemble = new FitEnsemble();
   _currentParameters = new ParameterSet();
   _fitEnsemble.Changed += new EventHandler(EhFitEnsemble_Changed);
 }
Beispiel #13
0
        /// <summary>
        /// Constructor of the adapter.
        /// </summary>
        /// <param name="ensemble">The fit ensemble, i.e. the functions and data you intend to fit.</param>
        /// <param name="paraSet">The set of initial parameter. Must contain a initial estimation of the parameters. Contains also information which
        /// parameters can vary and which are fixed during the fitting procedure.</param>
        public LevMarAdapter(FitEnsemble ensemble, ParameterSet paraSet)
        {
            _fitEnsemble = ensemble;

            CalculateCachedData(paraSet);
        }
Beispiel #14
0
		public FitEnsembleController(FitEnsemble doc)
		{
			_doc = doc;
			Initialize();
		}
Beispiel #15
0
		public NonlinearFitDocument()
		{
			_fitEnsemble = new FitEnsemble() { ParentObject = this };
			_currentParameters = new ParameterSet();
		}
Beispiel #16
0
    public object Clone()
    {
      FitEnsemble result = new FitEnsemble();
      foreach (FitElement ele in this)
        result.Add((FitElement)ele.Clone());

      return result;
    }
Beispiel #17
0
    public void Initialize(FitEnsemble ensemble, object[] fitEleControls)
    {
      // remove all child controls first.
      this.Controls.Clear();

      // foreach element in the ensemble, create a new control, and 
      // position the elements

      int currentYPosition = 0;
      for(int i=0;i<fitEleControls.Length;i++)
      {
        Control fectrl = (Control)fitEleControls[i];
        fectrl.Location = new Point(0,currentYPosition);
        fectrl.Size = new Size(this.ClientSize.Width, fectrl.Size.Height);
        fectrl.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
        this.Controls.Add(fectrl);

        currentYPosition += fectrl.Size.Height;
        currentYPosition += System.Windows.Forms.SystemInformation.MenuHeight;
      }

      this.AutoScroll=true;
      this.AutoScrollMinSize = new Size(this.ClientSize.Width,currentYPosition);
    }