| 177 | CRecursivePolyCoeffsEnumerator(IPolyCoeffsEnumerator& itr): m_global_enumerator(itr), m_local_enumerator(NULL) {} |
| 178 | |
| 179 | virtual bool MoveNext() |
| 180 | { |
| 181 | if( m_local_enumerator.MoveNext() ) |
| 182 | return true; |
| 183 | |
| 184 | if( !m_global_enumerator.MoveNext() ) // at the end of the main input polynomial? |
| 185 | return false; |
| 186 | |
| 187 | // TODO: make the following changeable (metaprogramming: use policy?), |
| 188 | // leave the following as default option... |
| 189 | poly p = ConverterPolicy::convert(m_global_enumerator.Current()); // Assumes that these numbers are just polynomials! |
| 190 | assume( p != NULL ); |
| 191 | |
| 192 | // the followig actually needs CPolyCoeffsEnumerator |
| 193 | m_local_enumerator.Reset( p ); // -1 position in p :: to be skipped now! |
| 194 | |
| 195 | if( m_local_enumerator.MoveNext() ) // should be true |
| 196 | return true; |
| 197 | |
| 198 | assume( FALSE ); return MoveNext(); // this should not happen as p should be non-zero, but just in case... |
| 199 | } |
| 200 | |
| 201 | virtual void Reset() |
| 202 | { |