/// <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); }
/// <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; } }
/// <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; }
/// <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; }
/// <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(); }
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); } }