algebramix_doc 0.3
carry_special_add_series_rep< C, V > Class Template Reference

#include <series_vector.hpp>

Inheritance diagram for carry_special_add_series_rep< C, V >:
series_rep

List of all members.

Public Member Functions

Protected Attributes


Detailed Description

template<typename C, typename V>
class mmx::carry_special_add_series_rep< C, V >

Definition at line 258 of file series_vector.hpp.


Constructor & Destructor Documentation

carry_special_add_series_rep ( const series< C, V > &  a2,
const series< C, V > &  b2,
const series< C, V > &  c2 
) [inline]

Definition at line 263 of file series_vector.hpp.

                                                        :
    Series_rep (CF(a2)), a(a2), b (b2), c (c2), r (0) {}

Member Function Documentation

syntactic expression ( const syntactic &  z) const [inline]

Definition at line 266 of file series_vector.hpp.

References carry_special_add_series_rep< C, V >::a, carry_special_add_series_rep< C, V >::b, carry_special_add_series_rep< C, V >::c, and mmx::flatten().

                                                  {
    return apply (apply (syntactic ("carry_special_add"), flatten (a, z),
                         flatten (b,z)), flatten (c,z)); }
virtual C next ( ) [inline, virtual]

Definition at line 274 of file series_vector.hpp.

References carry_special_add_series_rep< C, V >::a, carry_special_add_series_rep< C, V >::b, mmx::C, carry_special_add_series_rep< C, V >::c, D, and carry_special_add_series_rep< C, V >::r.

                    {
    D s = a[this->n].rep + b[this->n].rep + c[this->n].rep + r;
    if (s < * C::get_modulus ()) {
      r = 0;
      return C (s);
    }
    r = 1;
    return C(s - (* C::get_modulus ())); }

Member Data Documentation

C::C r [protected]

Definition at line 261 of file series_vector.hpp.

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


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