public void Append(CFactorList thatFactorList) { for (int i = 0; i < thatFactorList.Count; ++i) { Add(thatFactorList[i]); } }
// deep copy public CExpression(CExpression thatExpression) { Init(); _numerator = new CFactorList(thatExpression.Numerator); _denominator = new CFactorList(thatExpression.Denominator); _power = new CRatio(thatExpression.RatioPower); _log = thatExpression.Log; _symbolCount = thatExpression.SymbolCount; }
private void Init() { _power = new CRatio(1); _numerator = new CFactorList(); _denominator = new CFactorList(); _log = 0; _isLogValid = false; _isValid = true; _symbolCount = 0; }
// This constructor makes a deep copy public CFactorList(CFactorList thatFactorList) : base() { int i; for (i = 0; i < thatFactorList.Count; ++i) { CFactor thisFactor = new CFactor(thatFactorList[i]); Add(thisFactor); } _isDirty = thatFactorList.IsDirty; }