Example #1
0
        /// <summary>
        /// Creates either a deep or shallow copy, depending on the <c>deepCopy</c> value.
        /// </summary>
        new public SmallData Clone()
        {
            SmallData d = new SmallData();

            d.CopyFrom(this);
            return(d);
        }
Example #2
0
 /// <summary>
 /// Copies from another data array either with a deep or shallow copy, depending on the
 /// <c>deepCopy</c>c> value.
 /// </summary>
 public void CopyFrom(SmallData d)
 {
     base.CopyFrom(d);
     if (!d.deepCopy)
     {
         data = d.data;
     }
 }
Example #3
0
		/// <summary>
		/// Creates either a deep or shallow copy, depending on the <c>deepCopy</c> value.
		/// </summary>
		new public SmallData Clone() {
			SmallData d = new SmallData();
			d.CopyFrom(this);
			return d;
		}
Example #4
0
		/// <summary>
		/// Copies from another data array either with a deep or shallow copy, depending on the
		/// <c>deepCopy</c>c> value.
		/// </summary>
		public void CopyFrom(SmallData d) {
			base.CopyFrom(d);
			if (!d.deepCopy) data = d.data;
		}
Example #5
0
		/// <summary>
		/// Copies from another with a deep copy.
		/// </summary>
		/// <param name="item"></param>
		public override void CopyFrom(PlotItem item) {
			base.CopyFrom(item);
			source = (string)((FunctionItem)item).source.Clone();
			p = (SmallData)((FunctionItem)item).p.Clone();
		}
Example #6
0
 /// <summary>
 /// Copies from another with a deep copy.
 /// </summary>
 /// <param name="item"></param>
 public override void CopyFrom(PlotItem item)
 {
     base.CopyFrom(item);
     source = (string)((FunctionItem)item).source.Clone();
     p      = (SmallData)((FunctionItem)item).p.Clone();
 }
Example #7
0
			public DerivFunction(Function1D f) {
				code = f.code;
				p = f.p;
				if (f.dfdp.Length == f.p.Length) {
					dfdp = f.dfdp;
					fast = true;
					this.f = f.f;
				} else {
					dfdp = new SmallData();
					fast = true;
					dfdp.Length = p.Length;
					this.f = new Code(F);
				}
			}