subst_mul_series_rep< C, V, UV > Class Template Reference

#include <series_implicit.hpp>

List of all members.

Public Member Functions

Public Attributes


Detailed Description

template<typename C, typename V, typename UV>
class mmx::subst_mul_series_rep< C, V, UV >

Definition at line 374 of file series_implicit.hpp.


Constructor & Destructor Documentation

subst_mul_series_rep ( const series< unknown< C, V > > &  f,
const series< unknown< C, V > > &  g 
) [inline]

Definition at line 380 of file series_implicit.hpp.

00380                                                                   :
00381     implementation<series_abstractions,UV>
00382      ::template binary_series_rep<mul_op,UC,UV> (f, g),
00383     f_sh (1), g_sh (1), f_kn (known (f)), g_kn (known (g)),
00384     inner (rshiftz (f_kn, (int) f_sh) * rshiftz (g_kn, (int) g_sh)) {}
  UC next () {


Member Function Documentation

unknown<C,V> next (  )  [inline]

Definition at line 385 of file series_implicit.hpp.

References subst_mul_series_rep< C, V, UV >::f_kn, subst_mul_series_rep< C, V, UV >::f_sh, subst_mul_series_rep< C, V, UV >::g_kn, subst_mul_series_rep< C, V, UV >::g_sh, subst_mul_series_rep< C, V, UV >::inner, mmx::is_known(), mmx::rshiftz(), mmx::substitute(), and UC.

00385              {
00386     if (this->n >= g_sh &&
00387         !is_known (substitute (this->f [this->n - g_sh]))) {
00388       g_sh = g_sh << 1;
00389       inner= rshiftz (f_kn, (int) f_sh) * rshiftz (g_kn, (int) g_sh);
00390     }
00391     if (this->n >= f_sh &&
00392         !is_known (substitute (this->g [this->n - f_sh]))) {
00393       f_sh = f_sh << 1;
00394       inner= rshiftz (f_kn, (int) f_sh) * rshiftz (g_kn, (int) g_sh);
00395     }
00396     if (this->n < f_sh + g_sh) {
00397       UC acc= this->f[0] * this->g[this->n];
00398       for (nat i=1; i<=this->n; i++)
00399         acc += this->f[i] * this->g[this->n-i];
00400       return acc;
00401     }
00402     else {
00403       UC acc= f_kn[0] * this->g[this->n] + this->f[this->n] * g_kn[0];
00404       for (nat i=1; i<f_sh; i++)
00405         acc += f_kn[i] * this->g[this->n-i];
00406       for (nat i=1; i<g_sh; i++)
00407         acc += this->f[this->n-i] * g_kn[i];
00408       return acc + inner[this->n - f_sh - g_sh];
00409     }
00410   }


Member Data Documentation

Definition at line 379 of file series_implicit.hpp.

Referenced by subst_mul_series_rep< C, V, UV >::next().

nat f_sh

Definition at line 378 of file series_implicit.hpp.

Referenced by subst_mul_series_rep< C, V, UV >::next().

Definition at line 379 of file series_implicit.hpp.

Referenced by subst_mul_series_rep< C, V, UV >::next().

nat g_sh

Definition at line 378 of file series_implicit.hpp.

Referenced by subst_mul_series_rep< C, V, UV >::next().

Definition at line 379 of file series_implicit.hpp.

Referenced by subst_mul_series_rep< C, V, UV >::next().


The documentation for this class was generated from the following file:

Generated on 20 Mar 2013 for algebramix by  doxygen 1.6.1