예제 #1
0
 public void Append(CFactorList thatFactorList)
 {
     for (int i = 0; i < thatFactorList.Count; ++i)
     {
         Add(thatFactorList[i]);
     }
 }
예제 #2
0
 // 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;
 }
예제 #3
0
 private void Init()
 {
     _power       = new CRatio(1);
     _numerator   = new CFactorList();
     _denominator = new CFactorList();
     _log         = 0;
     _isLogValid  = false;
     _isValid     = true;
     _symbolCount = 0;
 }
예제 #4
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;
        }