| 29 | #include "cf_iter.h" |
| 30 | |
| 31 | CFFList |
| 32 | append (const CFFList & Inputlist, const CFFactor & TheFactor) |
| 33 | { |
| 34 | CFFList Outputlist; |
| 35 | CFFactor copy; |
| 36 | CFFListIterator i; |
| 37 | int exp=0; |
| 38 | |
| 39 | for (i= Inputlist; i.hasItem() ; i++) |
| 40 | { |
| 41 | copy= i.getItem(); |
| 42 | if (copy.factor() == TheFactor.factor()) |
| 43 | exp += copy.exp(); |
| 44 | else |
| 45 | Outputlist.append(copy); |
| 46 | } |
| 47 | Outputlist.append (CFFactor (TheFactor.factor(), exp + TheFactor.exp())); |
| 48 | return Outputlist; |
| 49 | } |
| 50 | |
| 51 | CFFList |
| 52 | merge (const CFFList & Inputlist1, const CFFList & Inputlist2) |
no test coverage detected