Example #1
0
        private void RecalculateParameterSet()
        {
            // save old values
            var byName = new System.Collections.Hashtable();

            for (int i = 0; i < _currentParameters.Count; i++)
            {
                byName.Add(_currentParameters[i].Name, _currentParameters[i]);
            }

            // now restore the values
            _currentParameters.Clear();

            for (int i = 0; i < _fitEnsemble.NumberOfParameters; i++)
            {
                string name = _fitEnsemble.ParameterName(i);
                if (byName.ContainsKey(name))
                {
                    _currentParameters.Add((ParameterSetElement)byName[name]);
                }
                else
                {
                    _currentParameters.Add(new ParameterSetElement(name));
                }
            }

            _currentParameters.OnInitializationFinished();
        }
Example #2
0
        public object Clone()
        {
            var result = new ParameterSet();

            for (int i = 0; i < Count; ++i)
            {
                result.Add((ParameterSetElement)this[i].Clone());
            }

            return(result);
        }
Example #3
0
            public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                ParameterSet s = o != null ? (ParameterSet)o : new ParameterSet();

                int arraycount = info.OpenArray();

                for (int i = 0; i < arraycount; ++i)
                {
                    s.Add((ParameterSetElement)info.GetValue("e", s));
                }
                info.CloseArray(arraycount);

                return(s);
            }
Example #4
0
		public object Clone()
		{
			ParameterSet result = new ParameterSet();
			for (int i = 0; i < Count; ++i)
				result.Add((ParameterSetElement)this[i].Clone());

			return result;
		}