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() { _fitEnsemble = new FitEnsemble() { ParentObject = this }; _currentParameters = new ParameterSet(); }
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. }
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(); }
public object Clone() { FitEnsemble result = new FitEnsemble(); foreach (FitElement ele in this) { result.Add((FitElement)ele.Clone()); } return(result); }
public FitEnsemble(FitEnsemble from) { foreach (var ele in from) { var toadd = (FitElement)ele.Clone(); toadd.ParentObject = this; _fitElements.Add(toadd); } CollectParameterNames(); }
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); }
public NonlinearFitDocument() { _fitEnsemble = new FitEnsemble(); _currentParameters = new ParameterSet(); _fitEnsemble.Changed += new EventHandler(EhFitEnsemble_Changed); }
/// <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 FitEnsembleController(FitEnsemble doc) { _doc = doc; Initialize(); }
public object Clone() { FitEnsemble result = new FitEnsemble(); foreach (FitElement ele in this) result.Add((FitElement)ele.Clone()); return result; }
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); }