algebramix_doc 0.3
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.

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

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.

             {
    if (this->n >= g_sh &&
        !is_known (substitute (this->f [this->n - g_sh]))) {
      g_sh = g_sh << 1;
      inner= rshiftz (f_kn, (int) f_sh) * rshiftz (g_kn, (int) g_sh);
    }
    if (this->n >= f_sh &&
        !is_known (substitute (this->g [this->n - f_sh]))) {
      f_sh = f_sh << 1;
      inner= rshiftz (f_kn, (int) f_sh) * rshiftz (g_kn, (int) g_sh);
    }
    if (this->n < f_sh + g_sh) {
      UC acc= this->f[0] * this->g[this->n];
      for (nat i=1; i<=this->n; i++)
        acc += this->f[i] * this->g[this->n-i];
      return acc;
    }
    else {
      UC acc= f_kn[0] * this->g[this->n] + this->f[this->n] * g_kn[0];
      for (nat i=1; i<f_sh; i++)
        acc += f_kn[i] * this->g[this->n-i];
      for (nat i=1; i<g_sh; i++)
        acc += this->f[this->n-i] * g_kn[i];
      return acc + inner[this->n - f_sh - g_sh];
    }
  }

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:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines