Example #1
0
 public void Add(int newFactor)
 {
     InAList.Add(newFactor);
     if (InAList.Count > 0 && InAList.Last() > newFactor)
     {
         throw new Exception("Your list is out of order!");
     }
     if (newFactor == lastFactor || newFactor == 2)
     {
         consecutiveFactorCounter++;
     }
     else
     {
         AsExponents.Add(new Value((double)lastFactor, (double)consecutiveFactorCounter, NumberType.exponent, Restrictions.dontFactorDontSetFraction));
         consecutiveFactorCounter = 0;
     }
     lastFactor = newFactor;
 }
Example #2
0
 public void Flush()
 {
     AsExponents.Add(new Value((double)lastFactor, (double)consecutiveFactorCounter + 1, NumberType.exponent, Restrictions.dontFactorDontSetFraction));
     Count = InAList.Count();
 }
Example #3
0
 public void Flush()
 {
     AsExponents.Add(new Value((double)lastFactor, (double)consecutiveFactorCounter + 1, NumberType.exponent));
     Count = InAList.Count();
 }