algebramix_doc 0.3
root_series_rep< M, V > Class Template Reference

#include <series_carry_naive.hpp>

Inheritance diagram for root_series_rep< M, V >:
recursive_series_rep< M, V > series_rep

List of all members.

Public Member Functions

Static Public Member Functions

Public Attributes


Detailed Description

template<typename M, typename V>
class mmx::root_series_rep< M, V >

Definition at line 578 of file series_carry_naive.hpp.


Constructor & Destructor Documentation

root_series_rep ( const generic &  f2,
const generic &  x2,
const M &  y02 
) [inline]

Definition at line 670 of file series_carry_naive.hpp.

                                                                      :
    Recursive_series_rep (get_format (y02)), f (f2), x (x2), y0 (y02) {}

Member Function Documentation

static generic _derive ( const generic &  e,
const generic &  x 
) [inline, static]

Definition at line 606 of file series_carry_naive.hpp.

References mmx::coefficients(), default_p_expansion, M, mmx::N(), Series, and root_series_rep< M, V >::x.

Referenced by root_series_rep< M, V >::initialize().

                                                              {
    if (e == x) return as<generic> (Series (1));
    if (is<Series> (e))
      return as<generic> (as<Series> (0));
    if (is<compound> (e)) {
      if (N(e) == 2) {
        if (e[0] == GEN_MINUS)
          return gen (GEN_MINUS, _derive (e[1], x));
        if (e[0] == GEN_SQUARE) {
          Series ser_2 (coefficients (as<default_p_expansion(M)> (2)));
          return gen (GEN_TIMES, as<generic> (ser_2),
                      gen (GEN_TIMES, _derive (e[1], x), e[1]));
        }
      }
      if (N(e) == 3) {
        if (e[0] == GEN_MINUS)
          return gen (GEN_MINUS, _derive (e[1], x), _derive (e[2], x));
        if (e[0] == GEN_PLUS)
          return gen (GEN_PLUS, _derive (e[1], x), _derive (e[2], x));
        if (e[0] == GEN_TIMES)
          return gen (GEN_PLUS, gen (GEN_TIMES, _derive (e[1], x), e[2]),
                      gen (GEN_TIMES, e[1], _derive (e[2], x)));
      }
    }
    ERROR ("bug, unexpected type with generic"); }
vector< series<M,V> > _eps ( const generic &  e,
const generic &  x 
) [inline]

Definition at line 632 of file series_carry_naive.hpp.

References M, mmx::N(), mmx::rec_add(), mmx::rec_cst(), mmx::rec_lin(), mmx::rec_minus(), mmx::rec_prod(), mmx::rec_square(), Series, root_series_rep< M, V >::x, and root_series_rep< M, V >::y0.

Referenced by root_series_rep< M, V >::initialize().

                                                           {
    if (is<Series> (e))
      return rec_cst (as<Series> (e));
    if (e == x)
      return rec_lin (Series (y0), Series (M(1)));
    if (is<compound> (e)) {
      if (N(e) == 2) {
        if (e[0] == GEN_MINUS)
          return rec_minus (_eps (e[1], x));
        if (e[0] == GEN_SQUARE)
          return rec_square (_eps (e[1], x), this->me ());
      }
      if (N(e) == 3) {
        if (e[0] == GEN_MINUS)
          return rec_minus (_eps (e[1], x), _eps (e[2], x));
        if (e[0] == GEN_PLUS)
          return rec_add (_eps (e[1], x), _eps (e[2], x));
        if (e[0] == GEN_TIMES)
          return rec_prod (_eps (e[1], x), _eps (e[2], x), this->me ());
      }
    }
    ERROR ("bug, unexpected type with generic"); }
static series<M,V> _eval ( const generic &  e,
const series< M, V > &  a 
) [inline, static]

Definition at line 583 of file series_carry_naive.hpp.

References mmx::N(), and mmx::square().

Referenced by root_series_rep< M, V >::initialize().

                                                          {
    if (is<literal> (e))
      return a;
    if (is<Series> (e))
      return as<Series> (e);
    if (is<compound> (e)) {
      if (N(e) == 2) {
        if (e[0] == GEN_MINUS)
          return - _eval (e[1], a);
        if (e[0] == GEN_SQUARE)
          return square (_eval (e[1], a));
      }
      if (N(e) == 3) {
        if (e[0] == GEN_MINUS)
          return _eval (e[1], a) - _eval (e[2], a);
        if (e[0] == GEN_PLUS)
          return _eval (e[1], a) + _eval (e[2], a);
        if (e[0] == GEN_TIMES)
          return _eval (e[1], a) * _eval (e[2], a);
      }
    }
    ERROR ("bug, unexpected type with generic"); }
syntactic expression ( const syntactic &  z) const [inline]

Definition at line 672 of file series_carry_naive.hpp.

                                                  {
    return z; }
virtual void Increase_order ( nat  l) [inline, virtual]
static void increase_order_generic ( generic  ff,
nat  l 
) [inline, static]

Definition at line 656 of file series_carry_naive.hpp.

References mmx::increase_order(), and mmx::N().

Referenced by root_series_rep< M, V >::Increase_order().

                                             {
    if (is<Series> (ff))
      increase_order (as<Series> (ff), l);
    if (is<compound> (ff)) {
      if (N(ff) == 2)
        increase_order_generic (ff[1], l);
      if (N(ff) == 3) {
        increase_order_generic (ff[1], l);
        increase_order_generic (ff[2], l);
      }
    }
  }
M & initial ( nat  n2) [inline, inherited]

Definition at line 131 of file series.hpp.

Referenced by root_series_rep< M, V >::initialize().

                      {
    if (n2>=this->n) { this->n = n2+1; Set_order (this->n); }
    return this->a[n2]; }
series<M,V> initialize ( ) [inline, virtual]
M next ( ) [inline, inherited]

Definition at line 137 of file series.hpp.

{ return eq[this->n]; }

Member Data Documentation

series<M ,V> eq [inherited]

Definition at line 126 of file series.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines